Shader: Texture Blending

A Unity3D shader that blends between two given textures and applies an optional tint color to them. Used primarily for special effects and texture transitioning.

Texture Blending


I developed this simple shader in Unity3D at Yeltic as a solution for these problems:

  • We had a scene with all baked lights, targeted for mobile. Which meant, no dynamic lights or shadows could be used.
  • We needed some way to “transition” a material’s texture for another. It was undesirable to simply swap textures at runtime. This particular effect was used as a means to transition between lightmaps and also to “animate” clothing textures getting wet.

I created also a component to easily animate materials using this shader, so we could achieve some ambient effects for the scene.

This way, we could transition to and from different colors: Texture Blending

And also textures: Texture Blending

This work was developed while working at Yeltic: http://yeltic.com/en/