mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Unify separate GL/GLES code paths for love’s built in matrices in shaders.
--HG-- branch : minor
This commit is contained in:
@@ -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 = [[
|
||||
|
||||
Reference in New Issue
Block a user