featureInputs.module
This package holds more than this page lists. See all of its files in its world.
README.md
renderer.featureInputs
What a render feature's render reads, and whether any of it moved. A feature that states its inputs (dependsOn, inputs) has render run only on a frame one of them moved; on every other frame the engine runs the passes the last render handed over. Its settings in force are always one of those inputs.
settingsInForce(feat, levels)answers a feature's settings at the quality levels in force, kept on its row until the authored settings or a level change.NAMESnames each input a feature may state independsOnand what it stands for.compile(mod, identity)answers the inputs a feature module states, or nil for one that states none, and refuses an input it does not know by name.holdsStill(feat, levels, frame)answers whether every input stands as it stood at the feature's last render, so its passes can be replayed.
local FeatureInputs = require("@builtin::modules.api.engine.renderer.featureInputs")
local inputs = FeatureInputs.compile({ dependsOn = { "viewport", "camera.cell:2" } }, "example")
assert(inputs.viewport == true and inputs.cell == 2)
assert(FeatureInputs.compile({}, "example") == nil)
assert(not pcall(FeatureInputs.compile, { dependsOn = { "weather" } }, "example"))
assert(FeatureInputs.NAMES.lights ~= nil)