stk-code_catmod/data/shaders/mlaa_offset.vert

18 lines
375 B
GLSL
Raw Normal View History

uniform vec2 PIXEL_SIZE;
2014-04-02 18:14:53 -04:00
in vec2 Position;
in vec2 Texcoord;
out vec4 offset[2];
out vec2 uv;
void main() {
2014-04-02 18:14:53 -04:00
gl_Position = vec4(Position, 0., 1.);
vec4 invy = vec4(Texcoord, Texcoord);
// invy.y = 1.0 - invy.y;
uv = invy.st;
offset[0] = invy.xyxy + PIXEL_SIZE.xyxy * vec4(-1.0, 0.0, 0.0, 1.0);
offset[1] = invy.xyxy + PIXEL_SIZE.xyxy * vec4( 1.0, 0.0, 0.0, -1.0);
}