- Home /
Shader compiler: internal error compiling shader snippet type=0 platform=0:
Cant find any information about this error. I'm writing a basic flat color shader as part of a tutorial and I'm pretty sure I wrote it out correctly. Any ideas on what I'm doing wrong? I'm on a 2014 macbook pro. TIA!
Here are the errors I get:
Shader compiler: internal error compiling shader snippet type=0 platform=0:
Shader error in 'Custom/Tutorial/FlatColor - 1': Internal error communicating with the shader compiler process
Here's my simple flat color shader:
Shader "Custom/Tutorial/FlatColor - 1" {
Properties {
_Color ("Color", Color) = (1.0,1.0,1.0,1.0)
}
SubShader {
Pass {
CGPROGRAM
//pragmas
#pragma vertex vert
#pragma fragment frag
//user defined vars
uniform float4 _Color;
//structs
struct vertexInput{
float4 vertex : POSITION;
}
struct vertexOutput{
float4 pos : SV_POSITON;
}
//
//vert prog
vertexOutput vert(vertexInput v){
vertexOutput o;
o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
return o;
}
//frag program
float4 frag(vertexOutput i) : COLOR
{
return _Color;
}
//
ENDCG
}
}
//fallback "Diffuse"
}
Answer by pajamajama · Aug 14, 2014 at 06:12 PM
Ahah! Missing my semicolons at the end of the struct definitions. Problem solved!
Your answer
Follow this Question
Related Questions
Can anyone help me with reflective shader with fall off property? 0 Answers
cross product in cg shader - error "can't find __getVectorIndex" 1 Answer
Parse error: Syntax Error in compiled shader, Unity 4.3.1 [free] 1 Answer
Shader error "Parser is hopelessly lost" when declaring uv2 variable. 1 Answer
Problem with lighting in CG Shader 1 Answer