Advertisement
Guest User

Untitled

a guest
Mar 16th, 2022
23
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None
  1. void main() {
  2. vec2 newCoord = TexCoord;
  3. // scale the coord around (0.5, 0.5)
  4. newCoord -= 0.5;
  5. newCoord *= 1.0 - float(blurSize) * (0.707 * 0.001);
  6. newCoord += 0.5;
  7. // if the pixel isn't on screen, return black
  8. if (newCoord.x > 0 && newCoord.x < 1 && newCoord.y > 0 && newCoord.y < 1)
  9. FragColor = texture(InputTexture, newCoord);
  10. else FragColor = vec4(0, 0, 0, 0);
  11. }
  12.  
Advertisement
RAW Paste Data Copied
Advertisement