aboutsummaryrefslogtreecommitdiff
path: root/visuals.frag
diff options
context:
space:
mode:
Diffstat (limited to 'visuals.frag')
-rw-r--r--visuals.frag6
1 files changed, 3 insertions, 3 deletions
diff --git a/visuals.frag b/visuals.frag
index 16e7712..d680834 100644
--- a/visuals.frag
+++ b/visuals.frag
@@ -1,8 +1,7 @@
#version 330 core
-#include "config.h"
-
uniform float time;
+uniform ivec2 window;
// adapted from <https://www.shadertoy.com/view/4djSRW>
float hash12(vec2 p) {
@@ -12,7 +11,8 @@ float hash12(vec2 p) {
}
void main() {
+ vec2 uv = gl_FragCoord.xy / window;
vec2 pos = gl_FragCoord.xy + time;
- gl_FragColor = vec4(vec3(hash12(pos)), 1.0);
+ gl_FragColor = vec4(hash12(pos), uv.xy, 1.0);
}