gear/shaders/shader.glsl

27 lines
313 B
Text
Raw Normal View History

2024-08-17 19:12:22 +12:00
@vs vs
in vec4 position;
2024-08-18 15:21:25 +12:00
in vec2 texcoord0;
2024-08-17 19:12:22 +12:00
2024-08-18 15:21:25 +12:00
out vec2 uv;
2024-08-17 19:12:22 +12:00
void main() {
2024-08-18 15:21:25 +12:00
gl_Position = position;
uv = texcoord0;
2024-08-17 19:12:22 +12:00
}
@end
@fs fs
2024-08-18 15:21:25 +12:00
uniform texture2D tex;
uniform sampler smp;
in vec2 uv;
2024-08-17 19:12:22 +12:00
out vec4 frag_color;
void main() {
2024-08-18 15:21:25 +12:00
frag_color = texture(sampler2D(tex, smp), uv);
2024-08-17 19:12:22 +12:00
}
@end
@program triangle vs fs