28 lines
322 B
GLSL
28 lines
322 B
GLSL
[[vertex]]
|
|
|
|
uniform mat4 mvp;
|
|
uniform vec2 tof;
|
|
uniform vec2 tsz;
|
|
|
|
in vec2 pos;
|
|
in vec2 uvs;
|
|
out vec2 uv;
|
|
|
|
void main()
|
|
{
|
|
uv = tof + uvs * tsz;
|
|
gl_Position = mvp * vec4(pos, 0.0, 1.0);
|
|
}
|
|
|
|
[[fragment]]
|
|
|
|
uniform sampler2D tex;
|
|
|
|
in mediump vec2 uv;
|
|
out mediump vec4 frag;
|
|
|
|
void main()
|
|
{
|
|
frag = texture(tex, uv);
|
|
}
|