"particle standard surface" shader build error, PC

Hello,


Answer: Moving to Unity 2018 beta helps


we are using new “particle standard surface” shader from time it appeared in forum thread.

When we moved to Unity 2017.3 at build-time editor throws this error, and files don’t appear on first try of build. On second try build-files appear.


  • Replacing shader and includes with 2017.3 built-in version didn’t helped.
  • Reinstall Unity 2017.3 didn’t helped
  • in 2017.3p2 same errors


Error text:

Shader error in ‘Particles/Standard Surface’: invalid subscript ‘instanceID’ ‘UnitySetupInstanceID’: no matching 1 parameter function at line 140 (on d3d11)

Compiling Vertex program with DIRECTIONAL INSTANCING_ON
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING

Yeah I can confirm this issue as well. I’m using the built in shader and my build fails most of the time. Every once in a while after building over and over I can get a playable version of my game. I’m going to try the beta to see if the issue exists there as well.

The shader is built in to 2017.3, you can delete your own version of it in your project.

FYI the instancing code in the engine changed, creating this error. You can delete the instancing code from the shader source if you know how - it is not used in 2017.3.

I have the same problem, is there any bug number that we can track on?

If you cant access the code to change it, disable instancing on the prefab, I found this worked