TypologySienna Chen
LookLightweight

Volumetric fog

Light you can see in the air.

Light you can see in the air: rays through a window, mist in a forest, clouds you can fly into. Real versions step through the space bit by bit and are expensive; cheap versions fake it with a blur.

Breaks when
raymarch step count kills fps fast
Also called
god rays, raymarched clouds, volumetric lighting

Prompts

God rays through architecture
A full-screen raymarched fog pass in Three.js layered over a normally rendered scene (using the depth buffer to stop marching at geometry): 48 steps, density from 3D noise (scale 0.4, drifting), a point light behind a row of columns, 6 shadow samples toward the light per step. Blue-noise jitter on the ray start to hide banding. Warm light, cool fog. Half resolution with a bilateral upscale.
Cheap god rays
Screen-space light shafts: render the emissive sun and occluders to a small target, then a radial blur of 40 samples toward the sun’s screen position (pmndrs GodRaysEffect or a custom pass), added back at 0.6. Show what breaks when the sun leaves the frame and how to fade it.
Height fog that sells scale
Replace THREE.Fog with a height-based exponential fog in a patched material (onBeforeCompile): density from the world y of each fragment, denser below y = 0, tinted by the scene’s environment at the horizon. Add a moving noise term so it breathes. Works on every material in the scene without touching them individually.

Related

Resources · 1