Browse Source

Shaders: don't exceed limits for no reason.

Shader::maxTextureImageUnits(Shader::Type::Fragment) is 16 on Ivy Bridge
and Mesa.
pull/94/head
Vladimír Vondruš 11 years ago
parent
commit
74b9670650
  1. 4
      src/Magnum/Shaders/AbstractVector.h
  2. 2
      src/Magnum/Shaders/DistanceFieldVector.frag
  3. 2
      src/Magnum/Shaders/Vector.frag

4
src/Magnum/Shaders/AbstractVector.h

@ -62,7 +62,7 @@ template<UnsignedInt dimensions> class AbstractVector: public AbstractShaderProg
* Vector texture binding unit
* @deprecated Use @ref Magnum::Shaders::AbstractVector::setVectorTexture() "setVectorTexture()" instead.
*/
VectorTextureLayer = 16
VectorTextureLayer = 15
};
#endif
@ -77,7 +77,7 @@ template<UnsignedInt dimensions> class AbstractVector: public AbstractShaderProg
~AbstractVector() = default;
#ifndef MAGNUM_BUILD_DEPRECATED
enum: Int { VectorTextureLayer = 16 };
enum: Int { VectorTextureLayer = 15 };
#endif
};

2
src/Magnum/Shaders/DistanceFieldVector.frag

@ -49,7 +49,7 @@ uniform lowp float smoothness;
#endif
#ifdef EXPLICIT_TEXTURE_LAYER
layout(binding = 16) uniform sampler2D vectorTexture;
layout(binding = 15) uniform sampler2D vectorTexture;
#else
uniform lowp sampler2D vectorTexture;
#endif

2
src/Magnum/Shaders/Vector.frag

@ -38,7 +38,7 @@ uniform lowp vec4 color;
#endif
#ifdef EXPLICIT_TEXTURE_LAYER
layout(binding = 16) uniform sampler2D vectorTexture;
layout(binding = 15) uniform sampler2D vectorTexture;
#else
uniform lowp sampler2D vectorTexture;
#endif

Loading…
Cancel
Save