Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #extension GL_EXT_gpu_shader4 : enable
- varying vec2 v_pos;
- uniform float rt_w;
- uniform float rt_h;
- varying vec2 v_rcpFrame;
- varying vec4 v_rcpFrameOpt;
- varying vec4 v_posPos;
- #define FXAA_SUBPIX_SHIFT (1.0/4.0)
- void main() {
- gl_Position = gl_Vertex;
- v_rcpFrame = vec2(1.0/rt_w, 1.0/rt_h);
- v_rcpFrameOpt = vec4(2.0/rt_w, 2.0/rt_h, 0.5/rt_w, 0.5/rt_h);
- v_pos = gl_Vertex.xy*0.5 + 0.5;
- v_posPos.xy = gl_MultiTexCoord0.xy;
- v_posPos.zw = gl_MultiTexCoord0.xy - (v_rcpFrame * (0.5 + FXAA_SUBPIX_SHIFT));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement