LightEffectBuildContext
Defined in: packages/three-flatland/src/lights/LightEffect.ts:41
Compile-time context — passed to buildLightFn (called once on attach).
Type Parameters
Section titled “Type Parameters”S extends EffectSchema = EffectSchema
Properties
Section titled “Properties”constants
Section titled “constants”constants:
EffectConstants<S>
Defined in: packages/three-flatland/src/lights/LightEffect.ts:45
Read-only constants from factory function fields.
lightStore
Section titled “lightStore”lightStore:
LightStore
Defined in: packages/three-flatland/src/lights/LightEffect.ts:47
The LightStore providing light data textures and count.
sdfTexture
Section titled “sdfTexture”sdfTexture:
Texture<unknown> |null
Defined in: packages/three-flatland/src/lights/LightEffect.ts:61
Stable reference to the scene’s SDF texture. Non-null only when the
effect’s class declared needsShadows = true — in that case Flatland
eagerly allocates the SDFGenerator before calling buildLightFn so the
reference is bindable in TSL texture() calls. The texture’s RTs are
1×1 placeholders at build time; the shadow pipeline system resizes
them on first frame and refreshes contents each subsequent frame,
without ever changing the reference.
Null when the active effect doesn’t declare needsShadows — shaders
should compile out the shadow path in that case (JS-level if, not
a GPU branch).
uniforms
Section titled “uniforms”uniforms: { [K in string | number | symbol]: SchemaToNodeType<S[K]> }
Defined in: packages/three-flatland/src/lights/LightEffect.ts:43
TSL uniform nodes for each uniform schema field, keyed by field name.
worldOffsetNode
Section titled “worldOffsetNode”worldOffsetNode:
UniformNode<"vec2",Vector2>
Defined in: packages/three-flatland/src/lights/LightEffect.ts:72
Camera frustum bottom-left offset uniform node, updated each frame.
worldSizeNode
Section titled “worldSizeNode”worldSizeNode:
UniformNode<"vec2",Vector2>
Defined in: packages/three-flatland/src/lights/LightEffect.ts:68
Camera frustum width/height uniform node, updated each frame from the camera bounds. Effects that map between world and UV space (shadow sampling, radiance cascades, any other screen-projected sampler) consume this instead of rolling their own uniform.