diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-05-18 10:40:34 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-05-18 10:40:34 +0200 |
commit | e74b821cf13869a99ac2933493207680d6666186 (patch) | |
tree | 66b62ff3f5f129ead45b3120c73dab409baee160 /visuals.frag | |
parent | 397bc9e3614fb33c11e99cd9e68a2d613af2b34b (diff) |
WIP bug (bug still exists
Diffstat (limited to 'visuals.frag')
-rw-r--r-- | visuals.frag | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/visuals.frag b/visuals.frag index d680834..8e83f6e 100644 --- a/visuals.frag +++ b/visuals.frag @@ -1,18 +1,9 @@ #version 330 core -uniform float time; -uniform ivec2 window; - -// adapted from <https://www.shadertoy.com/view/4djSRW> -float hash12(vec2 p) { - vec3 p3 = fract(vec3(p.xyx) * .1031); - p3 += dot(p3, p3.yzx + 33.33); - return fract((p3.x + p3.y) * p3.z); -} +uniform float test; void main() { - vec2 uv = gl_FragCoord.xy / window; - vec2 pos = gl_FragCoord.xy + time; - gl_FragColor = vec4(hash12(pos), uv.xy, 1.0); + vec2 uv = gl_FragCoord.xy / ivec2(800, 600); + gl_FragColor = vec4(uv.xy, test, 1.0); } |