Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

LightingScenario

Cross-fades a probe volume between two baked lighting states. Sits beside a VolumeProbe.

local scenarios = require("@builtin::systems.globalIllumination.scenarios")

-- light the scene for noon, bake, then:
scenarios.capture(volId, "noon")
-- light it for dusk, bake again, then:
scenarios.capture(volId, "dusk")

entity(volId).component.add("LightingScenario", {
    from = "noon", to = "dusk", blend = 0,
})
fieldmeaning
fromthe captured scenario at blend = 0
tothe captured scenario at blend = 1
blendwhere between them the volume's indirect light sits

Both names must already name a capture; until they do, nothing is published and the volume keeps whatever field it last had.

A weight that has not moved republishes nothing, so holding a scenario costs no per-frame work.

For more than two states, or a schedule of your own, drive @builtin::systems.globalIllumination.scenarios directly.