Blending one material/texture/shader to another


How do I blend a material into another material over a specific amount of time? I was thinking about something like crossfade, but for materials. I do not necessarily need to blend both textures and shaders at the same time. Sometimes I only want to blend into another shader, sometimes I want to blend into another texture. So I was wondering what command(s) can blend materials (textures and shaders)… If you have any other information regarding this you are welcome to post a comment.

  • to lerp float and color values you can use:
  • to lerp textures you should use shader that supports blending. every shader can be easy improved to support it, or see below

  • to lerp shaders it’s a one way to draw mesh using both shaders at once and blend results using lerp value as alpha. to implement this method one of shaders also should be improved a little