Advertisement
Guest User

Untitled

a guest
Nov 8th, 2016
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #ifdef GL_ES
  2. precision mediump float;
  3. precision mediump int;
  4. #endif
  5.  
  6. #define PROCESSING_TEXTURE_SHADER
  7.  
  8. uniform sampler2D texture;
  9. uniform vec2 texOffset;
  10. varying vec4 vertTexCoord;
  11.  
  12. void main(void) {
  13. int i = 0;
  14. int j= 0;
  15. vec4 sum = vec4(0.0);
  16.  
  17. for( i=-5;i<5;i++) {
  18. for( j=-5;j<5;j++) {
  19. sum += texture2D( texture, vertTexCoord.st + vec2(j,i)*texOffset.st)*0.05;
  20. }
  21. }
  22.  
  23. gl_FragColor = sum*sum+ vec4(texture2D( texture, vertTexCoord.st).rgb, 1.0);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement