0
Under review

Error when compiling

alvar 9 years ago updated 9 years ago 12
I get this Error when compiling my shaders, my shader can still work though:

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
Under review
This was fixed in 1.21, do you get it in 1.21 too, even after recompiling?
Yes, and I tried to remove SF, reset layout and import it again.
That really shouldn't be possible at all, there's nothing that writes gl_ anymore. It sounds like you may have shaders using the same path (a result of duplication), where you've only recompiled one of them. It could also be a cache issue, or a selective recompilation issue, where Unity doesn't recompile the GLSL path because you're not currently using it.
I can try to recompile all my shaders
Try deleting Library/ and Temp/ folders in your project folder first too, to clear the cache
(After closing Unity, then reopen it)
Deleting Library got rid of the Error but now Unity crashes when I compile a shader :/

Edit: Maybe it did not get rid of the eror, I just did not see it because of the Unity crash.

Any errors/crashlog? How does it crash? Does Unity/Shader Forge crash or did the shader just not compile?
Unity crashed. I reinstalled SF again end the error is back
Also got this:

InvalidOperationException: Operation is not valid due to the current state of the object
System.Collections.Stack.Peek () (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections/Stack.cs:321)
UnityEngine.GUILayoutUtility.EndLayoutGroup ()
UnityEngine.GUILayout.EndHorizontal ()
ShaderForge.SF_Editor.FlexHorizontal (System.Action func)
ShaderForge.SF_Editor.DrawPrimaryMainMenuGUI ()
ShaderForge.SF_Editor.DrawMainMenu ()
ShaderForge.SF_Editor.OnGUI ()
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

I'm not quite sure why this happens uniquely to you. That's a GUI error, which pretty much everyone should be getting, including me :(
Maybe it is fighting with my plugins? Using voxelbusters Native plugin and Unity Ads.