Obi Official Forum
invalid subscript '_ShadowCoord' in ParticleShader.shader - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: invalid subscript '_ShadowCoord' in ParticleShader.shader (/thread-3801.html)



invalid subscript '_ShadowCoord' in ParticleShader.shader - riesvriend - 14-03-2023

Error in line 100, build error "invalid subscript '_ShadowCoord' in ParticleShader.shader"

Code:
UNITY_LIGHT_ATTENUATION(atten,i,0);


Per https://forum.unity.com/threads/invalid-subscript-in-shader.982245/, the below change in line 49 fixed it:

Code:
struct v2f
{
float4 pos  : SV_POSITION;
fixed4 color    : COLOR;
float4 mapping  : TEXCOORD0;
float3 viewRay : TEXCOORD1;
float3 lightDir : TEXCOORD2;
float3 a2 : TEXCOORD3;
float3 a3 : TEXCOORD4;
UNITY_LIGHTING_COORDS(5, 6) // Fix. This was: LIGHTING_COORDS(5, 6)
};


Failing project is Android OpenGLES3. Can't reproduce in a blank but similar project. Any clues?