1

I was making a shader script in Unity and I got a syntax error. I don't see any mistake in there, though. Does anyone else see the trouble maker?

Shader "Custom/Toon" {
    Properties {
            ...
        _OutlineColor ("Outline Color", Color) = (0,0,0,1)
            ...
    }
    SubShader {
        Pass {
            Tags { "LightMode" = "ForwardBase" }
            GLSLPROGRAM
            ...
            uniform vec4 _OutlineColor; //Line 19
            ...
3
  • use float4 instead of vec4 ? Commented Nov 14, 2013 at 10:15
  • Same error plus two more. Commented Nov 14, 2013 at 10:32
  • Oh right, here are the errors I get: Shader error in 'Custom/Toon': Parse error: syntax error at line 19 Shader error in 'Custom/Toon': ERROR: 0:20: error(#132) Syntax error: '_OutlineColor' parse error at line 20 Shader error in 'Custom/Toon': See Temp\vsShader00_0.txt (compiling for cafe) at line 20 Commented Nov 14, 2013 at 10:35

1 Answer 1

1

Problem solved. All I had to do is changing "GLSLPROGRAM" and "ENDGLSL" into "CGPROGRAM" and "ENDCG".

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.