Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #extension GL_EXT_gpu_shader4 : enable
  2. varying vec2 v_pos;
  3. uniform float rt_w;
  4. uniform float rt_h;
  5. varying vec2 v_rcpFrame;
  6. varying vec4 v_rcpFrameOpt;
  7. varying vec4 v_posPos;
  8.  
  9. #define FXAA_SUBPIX_SHIFT (1.0/4.0)
  10.  
  11. void main() {
  12. gl_Position = gl_Vertex;
  13.  
  14. v_rcpFrame = vec2(1.0/rt_w, 1.0/rt_h);
  15. v_rcpFrameOpt = vec4(2.0/rt_w, 2.0/rt_h, 0.5/rt_w, 0.5/rt_h);
  16.  
  17. v_pos = gl_Vertex.xy*0.5 + 0.5;
  18.  
  19. v_posPos.xy = gl_MultiTexCoord0.xy;
  20. v_posPos.zw = gl_MultiTexCoord0.xy - (v_rcpFrame * (0.5 + FXAA_SUBPIX_SHIFT));
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement