Shaders problems

hi,

i’m trying my first CG shader but it doesn’t compile. here’s the code :

Shader "Mike/4_SimpleShader"{

	SubShader{
		Tags {"RenderType" = "Opaque"}
		
		CGPROGRAM
		#pragma surface surf Lambert
		
		struct MyInput {
			half3 color: COLOR;
		};
		
		void surf(MyInput myInput, inout SurfaceOutput o){
			o.Albedo = myInput.color;
		}
		
		ENDCG
	}

	Fallback "Diffuse"
}

what’s the problem with this code because the compiler says it has errors on line 24 and my code is 21 lines long…

‘MyInput’? I don’t think you can call it anything other than ‘Input’. Just like ‘update’ in C#.

ho, ok, i thought i could :slight_smile:

is it a predefined struct ?

thanks