Created
November 2, 2022 19:50
-
-
Save jonahwilliams/0e794d1c3c52efe7f70c0db81d65265f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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