Browse Source

Shaders: make the preprocessor less crazy and consistent with 2D.

What the heck. Probably 2011 me is to blame.
pull/268/head
Vladimír Vondruš 8 years ago
parent
commit
8e73cad1c1
  1. 23
      src/Magnum/Shaders/VertexColor3D.vert

23
src/Magnum/Shaders/VertexColor3D.vert

@ -28,23 +28,24 @@
#define out varying
#endif
#ifndef GL_ES
#ifdef EXPLICIT_UNIFORM_LOCATION
layout(location = 0) uniform mat4 transformationProjectionMatrix = mat4(1.0);
#else
uniform mat4 transformationProjectionMatrix = mat4(1.0);
#endif
#else
uniform highp mat4 transformationProjectionMatrix;
layout(location = 0)
#endif
uniform mat4 transformationProjectionMatrix
#ifndef GL_ES
= mat4(1.0)
#endif
;
#ifdef EXPLICIT_ATTRIB_LOCATION
layout(location = POSITION_ATTRIBUTE_LOCATION) in highp vec4 position;
layout(location = 3) in lowp vec4 color;
#else
layout(location = POSITION_ATTRIBUTE_LOCATION)
#endif
in highp vec4 position;
in lowp vec4 color;
#ifdef EXPLICIT_ATTRIB_LOCATION
layout(location = 3)
#endif
in lowp vec4 color;
out lowp vec4 interpolatedColor;

Loading…
Cancel
Save