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.
Comments (9)
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
- WebGPU error with Fantasy Kingdom and GPU Resident Drawer
- WebGPU fails with height fog in Fantasy Kingdom
- Crash on UndoManager::RegisterUndoInternal when applying added GameObjects to a Prefab
- [Asset Bundles] A new bundle hash is not generated when the name of a serialized field is changed
- Icon section shows incomplete message and unusable check box in Build Profiles and Player Settings window instead of “Not applicable for this platform” for Dedicated Server Platform
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!
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?