//go:build ignore //kage:unit pixels package main const THRESHOLD = .9 const DIRECTIONS = 30.0 // BLUR DIRECTIONS (Default 16.0 - More is better but slower) const QUALITY = 12.0 // BLUR QUALITY (Default 4.0 - More is better but slower) const SIZE = 5.0 // BLUR SIZE (Radius) const PI = 6.28318530718 // Pi*2 const OPACITY = 0.21 var Time float var NoiseOffset float func Fragment(dstPos vec4, srcPos vec2, color vec4) vec4 { uv := srcPos average := vec3(0.0) radius := SIZE / 2 amount := 0.0 for d:=0.0; d THRESHOLD { average += t amount += 1.0 } } } col := imageSrc0UnsafeAt(uv).rgb if amount > 0 { col += (average / amount) * OPACITY } return vec4(col,1.0) }