Browse Source

Shaders: ah so this wasn't a Mesa bug, it was my stupidity.

I just put this aside when I discovered the error, thinking it was a
Mesa bug. Now that ARM Mali yelled about the same, I realized it wasn't
just Mesa.

Note to self: Mesa has no bugs. Can you just finally accept that?!
pull/518/head
Vladimír Vondruš 5 years ago
parent
commit
2c578cb4df
  1. 3
      doc/changelog.dox
  2. 3
      src/Magnum/Shaders/MeshVisualizerGL.cpp

3
doc/changelog.dox

@ -403,6 +403,9 @@ See also:
- For meshes with multiple sets of vertex attributes (such as texture
coordinates), @ref MeshTools::compile() should be using only the first set
but it wasn't.
- @ref Shaders::MeshVisualizerGL3D "Shaders::MeshVisualizerGL*D" shader
compilation failed with missing @glsl gl_PrimitiveID @ce due to GLSL 3.20
not being properly used for the @glsl #version @ce directive
- @ref Shaders::PhongGL was normalizing light direction in vertex shader,
causing the fragment-interpolated direction being incorrect with visible
artifacts on long polygons under low light angle

3
src/Magnum/Shaders/MeshVisualizerGL.cpp

@ -137,7 +137,8 @@ GL::Version MeshVisualizerGLBase::setupShaders(GL::Shader& vert, GL::Shader& fra
/* Extended in MeshVisualizerGL3D for TBN visualization */
CORRADE_INTERNAL_ASSERT(!(_flags & FlagBase::Wireframe) || _flags & FlagBase::NoGeometryShader || version >= GL::Version::GL320);
#elif !defined(MAGNUM_TARGET_WEBGL)
const GL::Version version = context.supportedVersion({GL::Version::GLES310, GL::Version::GLES300, GL::Version::GLES200});
/* ES 3.2 needed for gl_PrimitiveID */
const GL::Version version = context.supportedVersion({GL::Version::GLES320, GL::Version::GLES310, GL::Version::GLES300, GL::Version::GLES200});
/* Extended in MeshVisualizerGL3D for TBN visualization */
CORRADE_INTERNAL_ASSERT(!(_flags & FlagBase::Wireframe) || _flags & FlagBase::NoGeometryShader || version >= GL::Version::GLES310);
#else

Loading…
Cancel
Save