Unify separate GL/GLES code paths for love’s built in matrices in shaders.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2016-12-28 19:32:43 -04:00
parent 80f269d252
commit 52b7b0f80d
4 changed files with 36 additions and 87 deletions
@@ -46,7 +46,6 @@ GLSL.SYNTAX = [[
-- Uniforms shared by the vertex and pixel shader stages.
GLSL.UNIFORMS = [[
#ifdef GL_ES
// According to the GLSL ES 1.0 spec, uniform precision must match between stages,
// but we can't guarantee that highp is always supported in fragment shaders...
// We *really* don't want to use mediump for these in vertex shaders though.
@@ -59,12 +58,6 @@ uniform LOVE_UNIFORM_PRECISION mat4 TransformMatrix;
uniform LOVE_UNIFORM_PRECISION mat4 ProjectionMatrix;
uniform LOVE_UNIFORM_PRECISION mat4 TransformProjectionMatrix;
uniform LOVE_UNIFORM_PRECISION mat3 NormalMatrix;
#else
#define TransformMatrix gl_ModelViewMatrix
#define ProjectionMatrix gl_ProjectionMatrix
#define TransformProjectionMatrix gl_ModelViewProjectionMatrix
#define NormalMatrix gl_NormalMatrix
#endif
uniform mediump vec4 love_ScreenSize;]]
GLSL.FUNCTIONS = [[