Builtin Library
README.md
RenderFeatures
The scene's render features, on one entity: a list of .renderFeature assets,
each with the settings it runs under.
entity(id).component.add("RenderFeatures", {
features = {
{ feature = "@builtin::systems.reflections.ssr", settings = { intensity = 0.8, quality = "high" } },
{ feature = "@builtin::renderFeatures.outline" },
},
})
While the component is enabled every listed feature is live. A feature
something already runs — a script's renderer.feature.create, another entity's
list — is adopted and configured rather than stacked a second time. Each
feature runs its passes at the phase and order its own render(ctx) declares.
Disabling or destroying the component tears every one of them down.
Editing the list re-syncs it: an entry removed goes, one added comes up, and a
changed settings table reaches the live feature on its next frame.
settings are the knobs the feature's asset declares —
renderer.feature.schema("@builtin::systems.reflections.ssr") lists them with
their defaults. A knob the feature does not declare, or a value of the wrong
shape, is refused by name in the log.
Methods: :getHandles() — the live handles this component holds, keyed by the
feature asset's guid.
For code that tunes a feature at runtime — a quality slider, a cutscene —
renderer.feature.find(ref) and renderer.feature.configure(handle, settings)
reach the same knobs without an entity.