Skip to content

Instantly share code, notes, and snippets.

@jonahwilliams
Created November 2, 2022 19:50
Show Gist options
  • Save jonahwilliams/0e794d1c3c52efe7f70c0db81d65265f to your computer and use it in GitHub Desktop.
Save jonahwilliams/0e794d1c3c52efe7f70c0db81d65265f to your computer and use it in GitHub Desktop.
#version 460 core
precision highp float;
layout(location = 0) uniform float width;
layout(location = 1) uniform float height;
layout(location = 2) uniform float animation;
layout(location = 3) uniform sampler2D source;
out vec4 fragColor;
void main() {
vec2 uv = gl_FragCoord.xy / vec2(width, height);
fragColor = texture(source, uv, -1.0) * animation;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment