From 8e73cad1c1a5531a6a123f30404bd0f1d1a6ac9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 4 Aug 2018 14:05:59 +0200 Subject: [PATCH] Shaders: make the preprocessor less crazy and consistent with 2D. What the heck. Probably 2011 me is to blame. --- src/Magnum/Shaders/VertexColor3D.vert | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/Magnum/Shaders/VertexColor3D.vert b/src/Magnum/Shaders/VertexColor3D.vert index 09dcfe896..47682472d 100644 --- a/src/Magnum/Shaders/VertexColor3D.vert +++ b/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;