API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfaceRadianceLightingOptions

@codexo/exojs-lighting / lighting / stable

Construction options for RadianceLighting.

9
props
0
methods
0
events
Import
import { RadianceLightingOptions } from '@codexo/exojs-lighting'

Construction options for RadianceLighting.

Properties9
Baseline colour every lit fragment receives regardless of any light, as a multiplier on the albedo - 255 per channel means "unlit areas keep their full albedo". Stored by reference and re-read every frame.
bounce?: number
How much of the light that lands on a surface it gives off again, in 0..1. A lit wall then tints what stands beside it with its own colour, one frame later - the light field of the previous frame is what says how lit it was. 0 switches the bounce off. Defaults to 0.5. Above one the feedback runs away; the value is clamped below it.
cascades?: number
Levels in the cascade chain. Defaults to as many as the view's own diagonal needs, which is what keeps the far end of a scene from going dark on a large surface.
fieldMargin?: number
How far beyond the camera's view the occluder mask and the geometry a ray walks reach, as a fraction of the view's size on each side. It is what lets a wall or a lamp just outside the picture still shadow or light what is in it, so neither pops in at the edge as the camera moves; the probes themselves still cover only the view. Defaults to 0.25, and costs that much more mask fill and collected geometry.
interval?: number
The finest cascade's ray length, in probe spacings. Each level covers four times what the level below it did, so this sets where the chain starts. Defaults to 1.
lightResolution?: number
Texels per logical unit of the light target. Light is low-frequency, so half resolution is hard to tell apart and costs a quarter of the fill. Defaults to 0.5 under LightmapLighting and to 1 under RadianceLighting, which SAMPLES the field instead of painting into it: the occluder mask a ray reads is rasterised at this density, so a coarse field quantises the scene rather than the light and a source moving by less than a texel makes the whole picture jump.
Filters applied to the shaded frame, in order. A bloom belongs here rather than on a node: it reads the light the system produced, including the parts no single node drew. They run as one pass in the host's frame slot, reading the composite, which is where the light the system accumulated is still above 1.0 (see Lighting.hdr). Caller-owned, and fixed for the system's lifetime - the filters' own parameters stay live, which is what an animated effect actually needs.
probeSpacing?: number
Light-field texels between the finest cascade's probes. Lower is sharper and costs a probe grid four times as large per halving. Defaults to 2. This is tuning rather than scene description: it changes how finely the same scene is sampled, never what is in it.
shadowResolution?: number
Angular bins in each light's shadow map. A bin is the finest shadow edge the renderer can resolve, so a large light on a high-resolution canvas wants more of them; the cost is linear in the light count. Defaults to 256. It trades against how wide a penumbra can get. The shadow filter samples every bin under its kernel and spends at most 21 fetches doing it, so the widest kernel is ten bins either side - three percent of a turn at the default, and proportionally less as the resolution rises. Raising this sharpens the hard edge rather than widening the softest one.
Source