[Day 390] Shader Validation error Assert.

I get an Assert(!"Shader validation failed") in the function OpenglCreateProgram. I know that my hardware supports glsl 1.40 . Can't seem to figure out the problem.

Edited by Shazan Shums on
Check the error messages from shader compiler. That assert is there exactly for reason to stop in debugger. Then it's up to you to check VertexErrors, FragmentErrors and ProgramErrors strings that will contain error messages. You can see Casey doing this in videos multiple times.

AFAIK HH is using OpenGL 3.2 for shaders - GLSL source has "#version 150", so that means GLSL 1.4 (OpenGL 3.1) is not supported.

Edited by Mārtiņš Možeiko on
FragmentsErrors shows this: ERROR: 2:5: 'GL_ARB_texture_multisample' : extension is disabled
ERROR: 2:6: 'GL_ARB_texture_multisample' : extension is disabled

How to bypass this.
Does your GPU and driver supports "GL_ARB_texture_multisample" extension?
Can you try to put "#extension GL_ARB_texture_multisample : require" at beginning of fragment shader?

For which shader does it fail with this error? CompileResolveMultisample?
No my driver doesn't have texture_multisample support. Does this mean handmade hero will not work on my PC or is there a fix .

Edited by Shazan Shums on
In current state it won't run.

If you would put "#if MultisamplingDebug" / "#endif" around "uniform sampler2DM" lines then it should run as long as you keep MultisamplingDebug setting to false. I believe that's its default value currently.

You'll also probably need to change "150" to "130" in #version line when multi sample is disabled.

Edited by Mārtiņš Možeiko on