#version 330 core uniform float time; uniform ivec2 window; // adapted from 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); } void main() { vec2 uv = gl_FragCoord.xy / window; vec2 pos = gl_FragCoord.xy + time; gl_FragColor = vec4(hash12(pos), uv.xy, 1.0); }