Log inGet started
Package

fog_apply.computeShader

README.md

fog_apply

fogOfWarKit's full-screen fog-of-war pass, run by fogOfWar.renderFeature at afterLighting (so the UI drawn later is never fogged).

Per pixel it rebuilds the world position from @scene.depth and the drawn camera (@frame.camera), samples the smoothed fog grid (fog_map, written by fog_smooth), and redraws the lit colour in one of four looks: classic (black unexplored, grey dimmed memory, feathered rims), mist (layered drifting cloud slabs with parallax over unexplored, thin haze over explored), parchment (aged paper with ink contours and a burnt rim, sepia memory) and pixel (crisp square cells, Bayer-dithered transitions, dark bevelled tiles). Sky pixels follow their view ray to the ground plane; a ray that never comes down keeps the sky. It writes fog_out (screen-sized rgba16f), which the feature copies back over the scene colour.

namekind
scene_colortexture2d
scene_depthtexture_depth
fog_maptexture2d
frame_cambuffer, read vec4<f32>
apply_paramsbuffer, read vec4<f32>
fog_outstorage2d (rgba16f)