mkxp/shader/simpleColor.vert
Jonas Kulla a53163660f Shader: Refine preprocessing on GLES platform
Don't globally set float precision to mediump, only fragment
shaders need that and defining it for vertex shaders causes
tilemap cracks.

Also manually define low precision for variables that hold
color / alpha values.
2014-12-31 18:52:19 +01:00

20 lines
340 B
GLSL

uniform mat4 projMat;
uniform vec2 texSizeInv;
uniform vec2 translation;
attribute vec2 position;
attribute vec2 texCoord;
attribute lowp vec4 color;
varying vec2 v_texCoord;
varying lowp vec4 v_color;
void main()
{
gl_Position = projMat * vec4(position + translation, 0, 1);
v_texCoord = texCoord * texSizeInv;
v_color = color;
}