I need some help for changing the below Shader to include a Mask Alpha Texture so it makes the border of the object to be transparent.
Any idea ?
This is the shader that must include the Mask:
Shader “Color + 2 Decals, Vertex Lit” {
Properties
{
_Color (“Main Color”, Color) = (1,1,1)
_SpecColor (“Spec Color”, Color) = (1,1,1)
_Emission (“Emmisive Color”, Color) = (0,0,0)
_Shininess (“Shininess”, Range (0.01, 1)) = 0.7
_MainTex (“Base (RGBA)”, 2D) = “”
_DecalTex (“Decal (RGBA)”, 2D) = “”
}
// More than two texture units
SubShader {Pass
{
Lighting On
SeparateSpecular On
Material
{
Diffuse (1,1,1)
Ambient (1,1,1)
Shininess [_Shininess]
Specular [_SpecColor]
Emission [_Emission]
}
SetTexture[_MainTex]
{
matrix [_Rotation]
ConstantColor[_Color]
Combine texture Lerp(texture) constant
}
SetTexture[_DecalTex] {matrix [Rotation1] Combine texture Lerp(texture) previous}
SetTexture[] {Combine previous * primary Double}
}}
// Two texture units
SubShader
{
Lighting On
Material
{
Diffuse (1,1,1)
Ambient (1,1,1)
Shininess [_Shininess]
Specular [_SpecColor]
Emission [_Emission]
}
Pass
{
SetTexture[_MainTex]
{
ConstantColor[_Color]
Combine texture Lerp(texture) constant
}
SetTexture[_DecalTex] {Combine texture Lerp(texture) previous}
}
// ‘Double’ Lighting
Pass {Blend DstColor SrcColor}
}
}