Avocado/data/shader/copy.shader
2019-07-18 18:12:22 +02:00

20 lines
No EOL
350 B
GLSL

uniform sampler2D vram;
SHARED vec2 fragTexcoord;
#ifdef VERTEX_SHADER
in vec2 position;
in vec2 texcoord;
void main() {
fragTexcoord = texcoord;
gl_Position = vec4(position.x * 2.0 - 1.0, position.y * 2.0 - 1.0, 0.0, 1.0);
}
#endif
#ifdef FRAGMENT_SHADER
void main() {
outColor = vec4(texture(vram, fragTexcoord).rgb, 1.0);
}
#endif