Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compile error : Invalid subscript _ShadowCoord
#4
(16-01-2018, 02:58 AM)Kumsan Wrote: Hi Jose,

Thank you for the reply. I am using Unity 2017.2.0p4 and my obi version is 3.2. When I click on the error message on the console, it goes to ParticleShader.shader and line 82 is this : UNITY_LIGHT_ATTENUATION(atten,i,0);   . Thank you


Regards,

Kumaresan

Hi,

I think I found the culprit.

It only happens to me when using "shadowmask" lighting mode in the light mapper.

To correct the issue, add the "nolightmap" shader compilation option in these two places:

- Obi/Resources/ObiMaterials/ParticleShader.shader, line 20 should look like this:
#pragma multi_compile_fwdbase nolightmap

- Obi/Resources/ObiMaterials/SimpleParticleShader.shader, again line 20 should look the same:
#pragma multi_compile_fwdbase nolightmap
Also remove line 68, since attenuation is not being used.

These changes should allow the shaders to compile under shadowmask lighting, since particles in the ObiParticleRenderer are always dynamic and cannot benefit from lightmaps (moreover, they are only used for visualization/debugging) it's best to remove lightmap support from their shader. Let me know how it works for you!

cheers,
Reply


Messages In This Thread
RE: Compile error : Invalid subscript _ShadowCoord - by josemendez - 19-01-2018, 07:10 PM