The shader below, is not affected by light how can i fix that?
Thank you.
Shader "Custom/TextureMask"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,0)
_SpecColor ("Spec Color", Color) = (1,1,1,1)
_Emission ("Emmisive Color", Color) = (0,0,0,0)
_Shininess ("Shininess", Range (0.01, 1)) = 0.7
_MainTex ("Base (RGB) Transparency (A)", 2D) = "white" {}
_Mask ("Culling Mask", 2D) = "white" {}
_Cutoff ("Alpha Mask", Range (1,0)) = 0.0
}
SubShader
{
Material {
Diffuse [_Color]
Ambient [_Color]
Shininess [_Shininess]
Specular [_SpecColor]
Emission [_Emission]
}
Lighting On
SeparateSpecular On
Tags {"Queue"="Transparent"}
AlphaTest LEqual [_Cutoff]
Pass
{
SetTexture [_Mask] {combine texture}
SetTexture [_MainTex] {combine texture + Primary , previous}
}
}
}
asked
Mar 22 '11 at 02:39 PM
Kourosh
1.5k
●
47
●
53
●
65