Hi there, sorry for the noob question but I’ve create a simple surface shader and put a texture and a normal map for it but can’t add vertex Color to it! I want to change the main color but just don’t know how.
Here is my code
Shader "My_Shaders/FirstShader" {
Properties {
_Color ("Main Color", Color) = (1,1,1,0.5)
_MainTex ("Texture", 2D) = "white" {}
_BumpMap ("Bumpmap", 2D) = "bump" {}
}
Subshader {
Tags { "RenderType" = "Opaque" }
CGPROGRAM
#pragma surface surf Lambert
struct Input {
float4 color : COLOR;
float2 uv_MainTex;
float2 uv_BumpMap;
};
sampler2D _MainTex;
sampler2D _BumpMap;
void surf (Input IN, inout SurfaceOutput o) {
o.Albedo = tex2D (_MainTex, IN.uv_MainTex).rgb;
o.Normal = UnpackNormal (tex2D (_BumpMap, IN.uv_BumpMap));
// What should I add here to get it to work ?
}
ENDCG
}
Fallback "Diffuse"
}