I’m not even sure what this would be called or think of any examples.
What I’m basically trying to figure out, is the floor has a texture, but also a secondary “dirt” texture on top. I want to be able to mop up the dirt texture but only the parts the mop touches.
I’ve tried to search for examples of this, but I can’t seem to find anything. I’m sure there is a solution somewhere, I’m just not sure what somthing like this would be called.
Many techniques, depending on the quality of what you want. Such as
A shader that supports secondary textures
Decals
Microsplat - replaces your shaders with a generative shader
I suppose option 2 is what you want. I suggest searching google/youtube for how to implement decals in the specific rendering pipeline you’re using, the technique will vary based on that.
Thank you for the reply, I have searched for different ways to do this. I was thinking through a shader would be best.
But I not able to find anything on this, as I am really not sure what the technique to accomplish this is called.
Searching for “erase parts of texture with a raycast URP” gives me no results unfortunately
If you compose your dirt out of several decals, then you can remove them one by one. Otherwise your decal solution would need some kind of masking.
In my own game I’m using Microsplat. It uses control textures to mask which part of a texture to render, and you can have several layers of these materials. But Microsplat is a product family and possibly overkill if you need a simple solution.
This is great, but it doesn’t seem to work with custom meshes that have a tiled UV.
I couldn’t think of an example when I asked for help. But the perfect example would be Power Wash simulator. I assume that’s a shader they are using.
I found 2 examples online, one was with shader graph that is massively outdated and no longer works, another is from code monkeys, but does not divulge into it much at all. I’m really not sure what this is called to do any searches for any tutorials.