Show the flashlight beam #85

Closed
opened 2026-10-20 08:49:29 +00:00 by sermuns · 1 comment
Owner

The flashlight is a Spot in Globals and nothing else. It lights what it
hits but has no presence in the air, so at night the beam appears as a lit circle
that slides across a wall, and turning it off is only visible on surfaces.

A visible cone is the difference between a lighting parameter and a torch someone
is holding. Render an additive cone from the torch tip along the eye direction, or
a short chain of camera-facing glow quads, faded with distance and at grazing
angles, tinted with the flashlight color. Reuse the same cone constants so the
glow and the light agree.

This needs additive blending, which the renderer does not currently use anywhere;
the draw should be after the lit pass with depth test on and depth write off.

Related: #39 will fill the night with light sources that want the same treatment.
#48 would look excellent falling through the beam.

The flashlight is a `Spot` in `Globals` and nothing else. It lights what it hits but has no presence in the air, so at night the beam appears as a lit circle that slides across a wall, and turning it off is only visible on surfaces. A visible cone is the difference between a lighting parameter and a torch someone is holding. Render an additive cone from the torch tip along the eye direction, or a short chain of camera-facing glow quads, faded with distance and at grazing angles, tinted with the flashlight color. Reuse the same cone constants so the glow and the light agree. This needs additive blending, which the renderer does not currently use anywhere; the draw should be after the lit pass with depth test on and depth write off. Related: #39 will fill the night with light sources that want the same treatment. #48 would look excellent falling through the beam.
sermuns added this to the Rendering milestone 2026-10-20 08:49:29 +00:00
Author
Owner

Closed by the merged batch: #142 (tier1-features) landed this, rebased onto main at 609dcb8.

Closed by the merged batch: #142 (tier1-features) landed this, rebased onto main at 609dcb8.
Sign in to join this conversation.
No description provided.