2013-11-30 16:33:06 -05:00
|
|
|
uniform vec2 PIXEL_SIZE;
|
2014-04-02 18:14:53 -04:00
|
|
|
|
|
|
|
in vec2 Position;
|
|
|
|
in vec2 Texcoord;
|
2014-01-09 19:30:56 -05:00
|
|
|
|
|
|
|
out vec4 offset[2];
|
|
|
|
out vec2 uv;
|
2013-11-30 16:33:06 -05:00
|
|
|
|
|
|
|
void main() {
|
2014-04-02 18:14:53 -04:00
|
|
|
gl_Position = vec4(Position, 0., 1.);
|
|
|
|
vec4 invy = vec4(Texcoord, Texcoord);
|
2013-11-30 16:33:06 -05:00
|
|
|
// invy.y = 1.0 - invy.y;
|
2014-01-09 19:30:56 -05:00
|
|
|
uv = invy.st;
|
2013-11-30 16:33:06 -05:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|