I need to modify the ‘Blend 2 Textures’ shader in order to be transparent, and to also all color tinting via a main ‘_Color’ channel.
I figured out how to make it transparent, but I cant figure out how to get the color to tint. Could you show me how? This is what I’ve got so far.
Shader "Blend 2 Textures Transparent"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_Blend ("Blend", Range (0, 1) ) = 0.5
_MainTex ("Texture 1", 2D) = ""
_Texture2 ("Texture 2", 2D) = ""
}
SubShader
{
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
ZTest Less
Blend SrcAlpha OneMinusSrcAlpha
Offset -1, -1
Pass {
SetTexture[_MainTex]
SetTexture[_Texture2] {
ConstantColor (0,0,0, [_Blend])
//ConstantColor[_Color] //added this in thinking it might do something but doesnt quite work...
Combine texture Lerp(constant) previous
}
}
}
}