Hi everyone,
I’ve a simple shader that combines two textures based on a “Blend” value.
Here’s the simple shader code:
Shader "Custom/Blend Textures" {
Properties {
_Blend ("Blend", Range (0, 1) ) = 0.0
_MainTex ("Texture 1", 2D) = ""
_Texture2 ("Texture 2", 2D) = ""
}
SubShader {
Pass {
SetTexture[_MainTex]
SetTexture[_Texture2] {
ConstantColor (0,0,0, [_Blend])
Combine texture Lerp(constant) previous
}
}
}
}
I’d like to add another Slider that controls the material transparency (0 = full transparent, 1 = full opaque).
How can achieve this?
Many thanks in advance!
Alessio