Advertisement
Guest User

Untitled

a guest
Mar 16th, 2022
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. void main() {
  2. vec2 newCoord = TexCoord;
  3. // scale the coord around (0.5, 0.5)
  4. newCoord -= 0.5;
  5. newCoord *= zoomFactor;
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement