diff options
author | davidovski <david@davidovski.xyz> | 2024-04-21 23:16:57 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2024-04-21 23:16:57 +0100 |
commit | 9af752349c40be745d1296d95675916f95977890 (patch) | |
tree | 326f087188c7885c0c070f656d21483a30f20680 /shaders/vcr.kage | |
parent | cffac12303402c3bfd2d7eb8ab982bdaa86bd72d (diff) |
fix placing things on the floor
Diffstat (limited to 'shaders/vcr.kage')
-rw-r--r-- | shaders/vcr.kage | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/shaders/vcr.kage b/shaders/vcr.kage index 3bee5cd..fd555d8 100644 --- a/shaders/vcr.kage +++ b/shaders/vcr.kage @@ -5,7 +5,7 @@ package main var Time float -var Cursor vec2 +var NoiseOffset float const noiseX = 80.0 const noiseY = 100.0 @@ -17,7 +17,6 @@ func rand(co vec2) float { } func Fragment(dstPos vec4, srcPos vec2, color vec4) vec4 { - noiseOffset := Time / 7 col := vec4(0) uv := srcPos / imageSrc0Size() @@ -25,7 +24,7 @@ func Fragment(dstPos vec4, srcPos vec2, color vec4) vec4 { uv.y = uv.y + (rand(vec2(Time))-0.5) / (noiseY); whiteNoise := rand(vec2(floor(uv.y*80.0),floor(uv.x*50.0))+vec2(Time,0)) - off := 1.0 - mod(uv.y - noiseOffset, 1) + off := 1.0 - mod(uv.y - NoiseOffset / 7, 1) if (whiteNoise > 11.5-30.0*(off)) || whiteNoise < 1.5-2.0*(off) { // Sample the texture. |