- Home /
How to make a part of a texture on an object seamlessly change to another texture?
Hey everyone, I'm trying to make a game 3rd person game for a project. The main gameplay mechanic is that when you walk over the ground or touch an object, a part of the texture will change into another texture seamlessly. With this I mean that it can't change the whole texture and it needs some kind of fade.
So what I already tried was raycasting on the place where the texture had to change and get the location of the pixel of the current texture then write a new color to this pixel and a few adjacent pixels. However this made the game lag a lot, so it isn't an option, the same goes for using 2 textures an placing one slightly lower then the other and turning the alpha of the pixels down. I also tried instantiate a texture a top, but it wouldn't blend well and it also made the game lag a lot. After that I tried partical effects but it didn't stay long enough to make it a good solution
I am currently using unity 5.0.1, so if there is any shader that can help me, it would need to work with the new shaderlab.