Hi, I have two different shader adapt to an object. I would like to use a script C# for alternand these two shader with a transition, when I press the E key.
I saw that I could use :
but I can not adhere to the shader. (I use shader forge to do the .shader;))
You can help me please
Thank you !
Material.Lerp can only blend between two materials using the exact same shader, and only for values that can be easily interpolated (ie: textures will just snap from one to the other, not change smoothly).
If you have two shaders that are entirely different, you may need to have a third shader that can do the transition, or look into implementing dithered cross fading for both shaders.
I found a solution. I created a shader with the texture that I can interchange with a lerp and a slider. then I just have to use the animator to change the slide. and I can therefore swap the map of the object