gear/shaders/shader.glsl
2024-08-18 15:21:25 +12:00

26 lines
313 B
GLSL

@vs vs
in vec4 position;
in vec2 texcoord0;
out vec2 uv;
void main() {
gl_Position = position;
uv = texcoord0;
}
@end
@fs fs
uniform texture2D tex;
uniform sampler smp;
in vec2 uv;
out vec4 frag_color;
void main() {
frag_color = texture(sampler2D(tex, smp), uv);
}
@end
@program triangle vs fs