[-force-opengl][5.2] Cant load shaders

Hello,

When ever i try to build a scene (even as simple as just with a cube) and then try to launch my exe with “-force-opengl” he can’t find the shaders and i get this purple color on every GameObjects.

So i tried it with different configurations with just a cube in a new scene in a new project:

  • AMD GPU
  • NVIDIA GPU
  • with all builtin shaders in the projects
  • with -force-glcore and -force-glcore45

It never works.

It works fine with DirectX, and with -force-opengl on the editor but as soon as i try it on the standalone .exe it doesn’t.

You can reproduct this very quickly :

  • Create a new project
  • Create a scene with just a cube and a camera in it
  • Build it
  • Open your build’s directory
  • Make a shortcut to your executable
  • In the properties of your shortcut add “-force-opengl” to the target path

Maybe I made a mistake and its standing right in front of me but please tell me if you get the same error as i do.

Here is the outputlog :

http://pastebin.com/raw.php?i=PcYhQENw

I have this issue since 5.2.1f1 patch (could have appeared in another patch the previous i had was the 5.1.1f1).

Thank you for your help.

Well Apparently since Unity 5.2 OpenGL isn’t supported by default.

For those who have the same issue, to change that :

  • Go to Player Settings
  • Uncheck Auto Graphics API for Windows (or for Linux)
  • Then Add OpenGL 2, or GLCore (OpenGL 2 for -force-opengl and GLCore for -force-glcore)

And there you go.

But i still think it should have remained by default.