Browse Source

Shaders: EXPLICIT_TEXTURE_LAYER is very misleading.

I went through renaming this on many places quite some time ago, but
this one slipped through. Now that UBOs will be a thing, rename to
EXPLICIT_BINDING instead of EXPLICIT_UNIFORM_BINDING.
pull/518/head
Vladimír Vondruš 5 years ago
parent
commit
d3e11765ac
  1. 2
      src/Magnum/Shaders/DistanceFieldVector.frag
  2. 2
      src/Magnum/Shaders/Flat.frag
  3. 2
      src/Magnum/Shaders/MeshVisualizer.frag
  4. 8
      src/Magnum/Shaders/Phong.frag
  5. 2
      src/Magnum/Shaders/Vector.frag
  6. 4
      src/Magnum/Shaders/compatibility.glsl
  7. 2
      src/Magnum/TextureTools/DistanceFieldShader.frag

2
src/Magnum/Shaders/DistanceFieldVector.frag

@ -65,7 +65,7 @@ uniform lowp float smoothness
/* Textures */
#ifdef EXPLICIT_TEXTURE_LAYER
#ifdef EXPLICIT_BINDING
/* See AbstractVector.h for details about the ID */
layout(binding = 6)
#endif

2
src/Magnum/Shaders/Flat.frag

@ -66,7 +66,7 @@ uniform highp uint objectId; /* defaults to zero */
/* Textures */
#ifdef TEXTURED
#ifdef EXPLICIT_TEXTURE_LAYER
#ifdef EXPLICIT_BINDING
layout(binding = 0)
#endif
uniform lowp sampler2D textureData;

2
src/Magnum/Shaders/MeshVisualizer.frag

@ -113,7 +113,7 @@ uniform lowp vec2 colorMapOffsetScale
/* Textures */
#if defined(INSTANCED_OBJECT_ID) || defined(VERTEX_ID) || defined(PRIMITIVE_ID) || defined(PRIMITIVE_ID_FROM_VERTEX_ID)
#ifdef EXPLICIT_TEXTURE_LAYER
#ifdef EXPLICIT_BINDING
layout(binding = 4)
#endif
uniform lowp sampler2D colorMapTexture;

8
src/Magnum/Shaders/Phong.frag

@ -148,7 +148,7 @@ uniform lowp float lightRanges[LIGHT_COUNT]
/* Textures */
#ifdef AMBIENT_TEXTURE
#ifdef EXPLICIT_TEXTURE_LAYER
#ifdef EXPLICIT_BINDING
layout(binding = 0)
#endif
uniform lowp sampler2D ambientTexture;
@ -156,21 +156,21 @@ uniform lowp sampler2D ambientTexture;
#if LIGHT_COUNT
#ifdef DIFFUSE_TEXTURE
#ifdef EXPLICIT_TEXTURE_LAYER
#ifdef EXPLICIT_BINDING
layout(binding = 1)
#endif
uniform lowp sampler2D diffuseTexture;
#endif
#ifdef SPECULAR_TEXTURE
#ifdef EXPLICIT_TEXTURE_LAYER
#ifdef EXPLICIT_BINDING
layout(binding = 2)
#endif
uniform lowp sampler2D specularTexture;
#endif
#ifdef NORMAL_TEXTURE
#ifdef EXPLICIT_TEXTURE_LAYER
#ifdef EXPLICIT_BINDING
layout(binding = 3)
#endif
uniform lowp sampler2D normalTexture;

2
src/Magnum/Shaders/Vector.frag

@ -45,7 +45,7 @@ uniform lowp vec4 color
#endif
;
#ifdef EXPLICIT_TEXTURE_LAYER
#ifdef EXPLICIT_BINDING
/* See AbstractVector.h for details about the ID */
layout(binding = 6)
#endif

4
src/Magnum/Shaders/compatibility.glsl

@ -35,7 +35,7 @@
#if !defined(GL_ES) && defined(GL_ARB_shading_language_420pack) && !defined(DISABLE_GL_ARB_shading_language_420pack)
#extension GL_ARB_shading_language_420pack: enable
#define RUNTIME_CONST
#define EXPLICIT_TEXTURE_LAYER
#define EXPLICIT_BINDING
#endif
#if !defined(GL_ES) && defined(GL_ARB_explicit_uniform_location) && !defined(DISABLE_GL_ARB_explicit_uniform_location)
@ -45,7 +45,7 @@
#if defined(GL_ES) && __VERSION__ >= 300
#define EXPLICIT_ATTRIB_LOCATION
/* EXPLICIT_TEXTURE_LAYER, EXPLICIT_UNIFORM_LOCATION and RUNTIME_CONST is not
/* EXPLICIT_BINDING, EXPLICIT_UNIFORM_LOCATION and RUNTIME_CONST is not
available in OpenGL ES */
#endif

2
src/Magnum/TextureTools/DistanceFieldShader.frag

@ -42,7 +42,7 @@ layout(location = 0)
#endif
uniform mediump vec2 scaling;
#ifdef EXPLICIT_TEXTURE_LAYER
#ifdef EXPLICIT_BINDING
layout(binding = 7)
#endif
uniform lowp sampler2D textureData;

Loading…
Cancel
Save