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
- [WebGL]"TypeError: Cannot read properties of undefined (reading 'length')" error is thrown when starting the Player when config.autoSyncPersistentDataPath is set to true
- [UaaL] Freeze on "GetLightingSettingsOrDefaultsFallback()" when rotating device screen after unloading Unity framework
- A white vertical artifact is present when any Material from HDRI is used for a panoramic skybox
- Editor freezes when handling Havok collision interactions between a thin collider and the player controller
- No blue outline is shown on a folder in the Project tab when an external file is being dragged over the folder
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?