Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

LightMaskBoundaryOptions

The line where a light mask’s light meets its dark, read from the texture’s red as a signed distance: 0.5 + distance / rampWidth, clamped from 0 to 1, with the distance in metres and positive in the light. Write that ramp across every boundary and join shapes with the larger value, as a max blend does, with one rampWidth for the whole texture. The line is drawn where red is 0.5, between texels too, so a ramp of two texels or more places it to well under a texel.

Property Type Default value Description
band? LightMaskBandOptions undefined A band of extra dark and thicker air along the dark side of the line. Left out, none.
blendWidth? number 0.3 Metres the drawn change from lit to dark spans, centred on the line. Far from the camera it widens to a pixel, so the line never breaks up into stairs. 0 or more, and at most rampWidth, past which red stops changing and the blend would be cut short.
curtain? LightMaskCurtainOptions undefined Soft strips of dark air the engine stands along the line on the ground, placed on the GPU from the mask each frame, so the curtain follows whatever the texture holds, and leaning with the line as it moves. An object turns it on with its defaults; left out, none.
rampWidth number undefined Metres the red channel spans from 0 to 1 across a boundary, the ramp the game writes: red is 0 at half this into the dark and 1 at half this into the light. Two texels wide or more, so the filter finds the line between them.
rim? LightMaskRimOptions undefined A thin line of light on the lit side, drawn on the ground alone: the Landscape’s ground, never a character or a prop. Left out, none.