Skip to content

OverlayLightingRenderer

Defined in: lighting/src/OverlayLightingRenderer.ts:89

Draws ambient colour plus radial lights into an offscreen buffer, then multiplies that buffer over the scene.

Coloured lights tint every surface they reach. A light with a cone is drawn as a pie slice aimed along its entity’s world rotation. An enabled occluder is opaque: each light is drawn through an inverse mask covering everything its occluders hide.

Shadow edges are hard whatever a light’s size says, and a cone’s edge is hard whatever its softness says. At size: 0 with an unsoftened cone the picture is exactly what LightingWorld.levelAt() reports; above either, the drawn edge runs along the middle of the soft border the query answers with, so the two agree everywhere except inside that border.

The bounced light the scene resolved to reaches the picture through LightingComposite, which every lighting renderer shares.

new OverlayLightingRenderer(context, options?): OverlayLightingRenderer

Defined in: lighting/src/OverlayLightingRenderer.ts:103

LightingRendererContext

OverlayLightingRendererOptions = {}

OverlayLightingRenderer

destroy(): void

Defined in: lighting/src/OverlayLightingRenderer.ts:165

Release every resource owned by this scene’s backend.

void

LightingRenderer.destroy


render(frame): void

Defined in: lighting/src/OverlayLightingRenderer.ts:151

Synchronize the backend with the world’s current lights and view.

LightingRenderFrame

void

LightingRenderer.render

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/lighting.md.