Projector lights: stop lighting the surface on the far side of a wall #152

Open
opened 2026-09-29 02:17:08 +00:00 by backspace119 · 0 comments
Owner

A projector light on one side of a wall also lights the surface on the other side. The projection shines "through" the wall onto the next room, or onto the wall's own back face. We want to disable that effect.

Cases to cover

  1. Projector shadows off (or the light doesn't cast shadows): the projector lights everything inside its frustum, with nothing to block it. This is LL's behaviour, but it looks wrong for walls and floors between rooms.
  2. The wall's back face: a thin or single-plane wall, or a face that is two-sided (glTF doubleSided, or alpha blend/mask with back faces drawn), can take light on the side facing away from the projector if the normal used for N·L is flipped for back faces.
  3. Shadows on, but still leaking: tracked in #3 (bias, texel size, cascade coverage).

Options

  • Back-face rejection: never light a fragment whose geometric normal faces away from the projector. This is cheap and fixes case 2 plus most thin-wall cases. Watch normal-mapped and two-sided foliage (a leaf lit from behind is sometimes wanted, e.g. translucency).
  • Occlusion without full shadows: use the depth-based projector shadow even for lights set not to cast shadows, or on RT-capable GPUs a single shadow ray (projector RT shadows already exist, RenderVKProjectorShadows 2).
  • Put it behind a setting (e.g. "Projectors don't light through walls"), since some creators rely on the old see-through behaviour.

Related: #3 (projector light bleeding through walls with shadow maps), #104 (RT projector shadow grain).

A projector light on one side of a wall also lights the surface on the **other side**. The projection shines "through" the wall onto the next room, or onto the wall's own back face. We want to disable that effect. ## Cases to cover 1. **Projector shadows off** (or the light doesn't cast shadows): the projector lights everything inside its frustum, with nothing to block it. This is LL's behaviour, but it looks wrong for walls and floors between rooms. 2. **The wall's back face:** a thin or single-plane wall, or a face that is two-sided (glTF `doubleSided`, or alpha blend/mask with back faces drawn), can take light on the side facing away from the projector if the normal used for N·L is flipped for back faces. 3. **Shadows on, but still leaking:** tracked in #3 (bias, texel size, cascade coverage). ## Options - **Back-face rejection:** never light a fragment whose *geometric* normal faces away from the projector. This is cheap and fixes case 2 plus most thin-wall cases. Watch normal-mapped and two-sided foliage (a leaf lit from behind is sometimes wanted, e.g. translucency). - **Occlusion without full shadows:** use the depth-based projector shadow even for lights set not to cast shadows, or on RT-capable GPUs a single shadow ray (projector RT shadows already exist, `RenderVKProjectorShadows 2`). - Put it behind a setting (e.g. "Projectors don't light through walls"), since some creators rely on the old see-through behaviour. Related: #3 (projector light bleeding through walls with shadow maps), #104 (RT projector shadow grain).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
backspace119/Slipstream#152
No description provided.