Rendering

SSAO

If your custom shader implements custom lighting you can sample the screen space ambient occlusion value for your lighting calculations.

float ScreenSpaceAmbientOcclusion::Sample( float4 ScreenPosition )

Returns 1.0 when no ambient occlusion has been rendered this frame.

Source: Facepunch/sbox-docs (CC-BY-4.0) · updated 2026-09-03. Read it rendered on the official docs.

More in Rendering

Community wiki — not affiliated with Facepunch Studios. For the latest and most authoritative information, see the official developer wiki.