Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #ifdef GL_ES
  2. precision mediump float;
  3. #endif
  4.  
  5. //// START C2 UNIFORMS HEADER ////
  6.  
  7. uniform sampler2D samplerBack;
  8. uniform sampler2D samplerFront;
  9. varying vec2 vTex;
  10. uniform vec2 destStart;
  11. uniform vec2 destEnd;
  12. uniform float seconds;
  13. uniform float pixelWidth;
  14. uniform float pixelHeight;
  15. vec2 iResolution = vec2( 1./pixelWidth, 1./pixelHeight);
  16.  
  17. //// END C2 HEADER ////
  18.  
  19.  
  20.  
  21. void main(void)
  22. {
  23. vec2 texel = vec2(pixelWidth,pixelHeight);
  24. vec2 uv = vTex;
  25.  
  26. vec2 center = .5-sqrt(2.)*vec2(50,-50)*texel;
  27.  
  28. float shadow = .75+.25*texture2D(samplerFront,(uv-center)/.87+center).a;
  29.  
  30. gl_FragColor = texture2D(samplerFront,uv)*vec4(vec3(shadow),1);
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement