Page 1 of 1

Shader Error trying to compile .. Bug in text code@!

PostPosted: Thu Jul 26, 2018 12:03 am
by sethhall
I'm making a complex radial uv distortion shader and I keep getting compiler errors. I finally tracked down how to fix it. I have to manually open the shader code and actually find the line it is complaining about.

Here is the error Unity is reporting.
Code: Select all
Shader error in 'ASETemplateShaders/Legacy/Particles Alpha Blended': syntax error: unexpected token ')' at line 114 (on glcore)
Compiling Vertex program
Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY 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_DLDR_ENCODING


Upon loading the shader in my text editor I find there is a stray period '.' ... in between some parenthesis. If I delete the period and save, the shader hten works. The issue here is.. Every time I make a change in the node graph I have to repeat this process. Does anyone know wtf is goin gon here?

Here is the line in the text code.
Code: Select all
               float4 appendResult23_g15 = (float4(break32_g15.x , break32_g15.y , (temp_output_14_0_g15).));


Notice the (temp_output_14_0_g15).)); <-- that period is bad news.

Seth

Re: Shader Error trying to compile .. Bug in text code@!

PostPosted: Thu Jul 26, 2018 9:04 am
by Amplify_Borba
Hello Seth, thank you for getting in touch and for your support!

Could you please send us the problematic shader including functions being used, if any, over to [email protected]?

It's always best if we can investigate the same data that generates the issue, not to mention that it greatly speeds up the debug process, thanks!

Re: Shader Error trying to compile .. Bug in text code@!

PostPosted: Thu Jul 26, 2018 8:23 pm
by sethhall
You got it. I just emailed over a .unityPackage. Looking forward to understanding whats going on. Thanks.

Seth

Re: Shader Error trying to compile .. Bug in text code@!

PostPosted: Fri Jul 27, 2018 9:10 am
by Amplify_Borba
Thank you for sending the sample, we'll keep in touch via email as we sort this issue out!