
Untitled
By: a guest on
Jul 20th, 2012 | syntax:
None | size: 0.56 KB | hits: 10 | expires: Never
Shader "Custom/DiffuseVertexColor" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
_Color("Color",Color) = (1,1,1,1)
}
SubShader {
Tags { "RenderType"="Opaque" }
LOD 200
CGPROGRAM
#pragma surface surf Lambert
sampler2D _MainTex;
float4 _Color;
struct Input {
float2 uv_MainTex;
float4 color : COLOR;
};
void surf (Input IN, inout SurfaceOutput o) {
half4 c = tex2D (_MainTex, IN.uv_MainTex);
o.Albedo = c.rgb * IN.color.rgb * _Color.rgb;
o.Alpha = c.a * IN.color.a * _Color.rgb;
}
ENDCG
}
FallBack "Diffuse"
}