Skip to content

Relit Levels

Kevin Mallinson edited this page Nov 14, 2026 · 3 revisions

Relit levels

THUG2's lighting is baked into each level: the light and shade are painted into the vertices and can't move. With rt_relit=1 the game takes a level's baked lighting apart when the level starts - into the surfaces' own colours and the light of the sun, the sky and the bounce - and lights the level again with it. With the level's own sun it looks as before; move the sun or change its colour and the shadows, shade and bounce light follow.

Relit Boston: the sun ahead of the camera on top, behind it below

Boston's cannon square twice, the sun moved round to the opposite side with the console's rt sun. Top: the sun ahead of the camera, over the left - the barrel's near side is in shade and the shadows reach back toward the camera. Bottom: the sun behind the camera on the right - the barrel lights up, and its shadow and the spoked wheels' fall forward across the bricks; the skater's shadow swings round with them. Default shadow strength.

Turning it on

Needs the Vulkan renderer, ray_tracing=1, a GPU with ray queries and the 64-bit build.

Where Setting
Options > Surfaces Relit levels, Relit strength (and Options > Lighting > Sun)
thug2-decomp.ini [Graphics] ray_tracing=1, rt_relit=1
Key Default What it does
rt_relit_strength 1 0 the level's own lighting, 1 all relit
rt_relit_residual 1 1 keeps the light the sun and sky can't explain (lamps, glows) as the level had it
rt_relit_detail 1 How much of each spot's own baked shading is kept (0-1; 0 relights the most)
rt_sun_source level level, game (the sun the game shows in the sky) or a direction x,y,z / heading,elevation

Tips and limits

  • The first time a level is relit it takes a second or two; the result is kept in thug2-decomp-relit\ next to the exe and loads at once after that.
  • The console's rt sun <x y z> moves the sun for this run (rt sun off puts it back), and rt sun source game switches rt_sun_source without a restart.
  • rt_sky_model=1 gives the sun the colour a real sky would (warm when low): the relit level takes it.
  • A level lit only by lamps (indoors) keeps its lighting.
  • Long shadows that cross the whole square at a low sun are real: the tall buildings around it cast them.

Clone this wiki locally