Search Issue Tracker
By Design
Votes
7
Found in
5.5.1p2
Issue ID
878185
Regression
No
Surface Shader with shader_features doesn´t compile
To reproduce:
1. Open attached project;
2. Reimport shader "SurfaceBug".
Expected result: Editor compiles the Surface Shader, it is possible to reimport it.
Actual result: Shader doesn't compile, Editor is not responding when trying to reimport the Shader. If you end task (Unity Shader Compiler) in the Task Manager, Console throws errors:
-Shader compiler: internal error preprocessing shader: Protocol error - failed to read correct magic number;
-Shader error in 'SurfaceBug': Parse error: syntax error, unexpected $end, expecting TOK_SHADER at line 1.
Reproduced on versions: 5.4.4p1, 5.5.1p2, 5.6.0b7.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on RaiseException when terrain detail instancing is excessive
- Prefab variant reference is lost when assigned by click-and-drag in Prefab Editor mode
- Opening any dropdown in Shader Graph stops the Nodes preview but it still plays in the background
- GPU utilization increases when a GameObject is selected
- Motion Blur has sharp edges when object is moving in the foreground of another object
Redrag
Dec 04, 2023 14:24
I hit this after updating some Microsoft stuff, nothing to do with Unity. The save as UTF-8 saved the day!
shubhamswaraj2021
Aug 18, 2020 05:29
good one <a href="https://www.lyricsauto.com">lyricsauto</a>
howong
Jan 10, 2018 01:21
VEGABEYOND, thanks I had a similar issue and encountered the 2nd error. Saving as UTF-8 fixed it.
VegaBeyond
Sep 23, 2017 23:52
Well I tried to 'save as' the shader to UTF-8 instead of UTF-16 and it works... Just post here if helps anyone
esoinila
Jul 10, 2017 06:44
My new game-machine also took it's time parsing this. In the end it finished and produced this same error on 5.6.0f3
yuliyF
Jun 09, 2017 10:44
Reproduced on 5.6p1
jasonburbage
May 13, 2017 01:00
Thank you Jacob! You saved me hours.
criticalmass
Feb 25, 2017 14:01
I'm suffering from the same issue.
JacobK
Feb 10, 2017 16:20
Was having a very very similar issue, ended up just leaving unity compiling the shader, and tabbing out for about 10 minutes, it eventually compiled it fine!
Might be worth giving that a go?