- Home /
How do you add a Color Tint to a shader?
I'm not at all good with code but I managed to put this together, But why doesn't the colour tint, tint?
[CODE]
Shader "Custom/IlumBlend" {
Properties { _Color ("Color Tint", Color) = (1,1,1,1) _MainTex ("Texture 1", 2D) = "" _Texture2 ("Texture 2", 2D) = "" }
SubShader {
Material { Emission [_Color] } Pass { SetTexture[_MainTex] SetTexture[_Texture2] { combine texture * primary + previous }
} }
}
[/CODE]
Answer by rogeliopuig · Jun 26, 2013 at 03:54 PM
There's some documentation on what you need here http://docs.unity3d.com/Documentation/Components/SL-SurfaceShaderExamples.html
The OP is using shaderLab (see those SetTexture and Combine commands?) which is completely different from a CG/surfaceShader.
Nothing wrong with that, but if they want to go the SurfaceShader route (which I prefer,) they'd be chucking all the code above.