Skip to content

Instantly share code, notes, and snippets.

@kirillrybin
Created November 6, 2014 07:40
Show Gist options
  • Save kirillrybin/4fc29a3550d657090a31 to your computer and use it in GitHub Desktop.
Save kirillrybin/4fc29a3550d657090a31 to your computer and use it in GitHub Desktop.
2 Texture Smooth Blending
Shader "Blend 2 Textures" {
Properties {
_Blend ("Blend", Range (0, 1) ) = 0.5
_MainTex ("Texture 1", 2D) = ""
_Texture2 ("Texture 2", 2D) = ""
}
SubShader {
Pass {
SetTexture[_MainTex]
SetTexture[_Texture2] {
ConstantColor (0,0,0, [_Blend])
Combine texture Lerp(constant) previous
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment