Repository navigation
Ray Traced Lighting
Kevin Mallinson edited this page Nov 14, 2026
·
2 revisions
Three effects that trace rays through the level on the GPU:
- Shadows - the sun's shadows, cast by the level and (by default) by the skater, pedestrians and cars. Their own blob shadows are hidden while the sun's are drawn.
- Ambient occlusion - corners, the ground under ledges and around objects darkened by how much sky they see.
- Bounce light (global illumination) - one bounce of sunlight: shaded ground beside a sunlit wall picks up its colour and brightness.
All three follow one sun: the one the level's own lighting was made with (see rt_sun_source below).

Boston. Left: the original. Right: rt_shadows=1 - the cannons and the tree cast the sun's shadows.

Boston, an alley, the same view twice. Top: off. Bottom: rt_ao=1 (with rt_ao_strength=1, rt_ao_radius=192) -
the corner, the ground along the walls and round the bin darken.

Boston, the same view twice. Top: shadows only. Bottom: with rt_gi=1 (rt_gi_strength=1.5) - the stone steps, the
statue and the alcoves pick up the warm light bounced off the sunlit brick.
Needs the Vulkan renderer, ray_tracing=1, a GPU with ray queries and the 64-bit build.
| Where | Setting |
|---|---|
| Options > Graphics | Ray tracing (restart) |
| Options > Lighting | Shadows, Ambient occlusion, Bounce light, with Shadow darkness, Shadow softness, Skater shadows, Occlusion darkness / reach / rays, Bounce strength / rays and Sun |
thug2-decomp.ini [Graphics]
|
ray_tracing=1, then rt_shadows=1, rt_ao=1, rt_gi=1
|
| Key | Default | What it does |
|---|---|---|
rt_shadow_strength |
0.5 | How dark a shadow is (0-1) |
rt_shadow_softness |
0 | The sun's size in degrees (0-5): 0 hard edges, more gives soft ones |
rt_shadow_rays |
4 | Rays a pixel for soft shadows (1-16) |
rt_shadow_objects |
1 | 1: the skater, peds and cars cast shadows too; 0: only the level |
rt_shadow_match_bake |
1 | No shadow where the level's own lighting is bright although the sun is blocked (lamps, a roof it left out) |
rt_shadow_covered |
0 | 1: shadows under roofs too |
rt_ao_strength |
0.6 | How dark full occlusion is (0-1) |
rt_ao_radius |
48 | How far a ray looks for something in the way (world units) |
rt_ao_rays |
4 | Rays a pixel each frame (1-16) |
rt_gi_strength |
1 | How much bounced light is added (0-4) |
rt_gi_rays |
2 | Rays a pixel each frame (1-16) |
rt_gi_distance |
600 | How far a ray looks for a surface to bounce from |
rt_sun_source |
level | The sun every effect uses: level (the one the level was lit with), game (the sun the game shows in the sky; relights the level), or x,y,z / heading,elevation
|
- A level lit only by lamps (indoors) has no sun: shadows and bounce light do nothing there. For lamps see Lamp lights.
- Ambient occlusion and bounce light are denoised over several frames;
rt_ao_denoise=0/rt_gi_denoise=0show the raw rays. - With DLSS,
ray_reconstruction=1cleans the noise instead of the built-in filters - see Upscaling. - For a sun you can move, see Relit levels.
Rendering
- Vulkan renderer
- Graphics options
- Ray-traced lighting
- Reflections
- Relit levels
- Per-pixel lighting
- Sky and fog
- Water
- Grass
- Lamp lights
- HDR and bloom
- Upscaling
- Tessellation
Looks
Gameplay and content
Tools