16 lines
449 B
GLSL
16 lines
449 B
GLSL
|
|
uniform mat4 g_ModelViewProjectionMatrix;
|
|
uniform vec4 g_Texture1Resolution;
|
|
|
|
attribute vec3 a_Position;
|
|
attribute vec2 a_TexCoord;
|
|
|
|
varying vec4 v_TexCoord;
|
|
|
|
void main() {
|
|
gl_Position = mul(vec4(a_Position, 1.0), g_ModelViewProjectionMatrix);
|
|
v_TexCoord.xy = a_TexCoord;
|
|
v_TexCoord.zw = vec2(v_TexCoord.x * g_Texture1Resolution.z / g_Texture1Resolution.x,
|
|
v_TexCoord.y * g_Texture1Resolution.w / g_Texture1Resolution.y);
|
|
}
|