+4
Fixed

Shader error: 'gl_' : reserved built-in name

MaverickDQ 9 years ago updated by Freya Holmér (Developer) 9 years ago 8
Just updated to latest SF from asset store.
When opening one of my shaders I get this error:

Shader error in 'TD2/Transparent/Building Transition': 'gl_' : reserved built-in name at line 162 (on opengl)
Compiling Vertex program with DIRECTIONAL SHADOWS_OFF LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF
on line 162:
Unity_GlossyEnvironmentData gl_en_data;


Please advice.

Answer

Answer
Fixed
This has now been fixed in 1.21, which is releasing within an hour
Planned
This is a known issue and will be fixed in the next update
May I ask you when the update with this fix is planned.

Thanks.
+1
Hard to say, but I would guess it's done by sunday
Is there a work around for it, until fix is done?
Rename the gl_en_data variable to something else, like gloss_en_data, wherever it's used in the shader code
Answer
Fixed
This has now been fixed in 1.21, which is releasing within an hour

I get these two (updated now to 1.22).

Shader error in 'Shader Forge/NewShader': 'gl_' : reserved built-in name at line 144 (on opengl)


Compiling Vertex program with DIRECTIONAL SHADOWS_OFF LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF

and


Shader error in 'Hidden/Shader Forge/PresetPBR': 'gl_' : reserved built-in name at line 144 (on opengl)


Compiling Vertex program with DIRECTIONAL SHADOWS_OFF LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF

I presume those aren't recompiled in that case, try reopening them with SF