diff options
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); } |