renderScale.package
This package holds more than this page lists. See all of its files in its world.
README.md
DynamicResolution
Makes the scene's render resolution a frame-time budget.
On any entity in the scene, the renderer draws the scene at fewer pixels when
the GPU frame runs over targetMs and gives them back when it runs under. The
image stays the size it was and the UI stays at the display's own resolution —
what changes is how sharp the scene is.
targetMs is the GPU's own frame time to hold. minScale / maxScale bound where
the scale may go, rate how much of the distance a step takes, and deadband
how far off the target a frame must be before the scale moves at all.
The stepping lives in @builtin::systems.renderScale.renderScale; this
component is the authored, persisted form of its settings and calls it each
frame. Several in one scene share one controller: the one edited last sets the
budget, removing it hands the controller to the newest of the others, and only
removing the last one hands the scale back.
At the governed quality levels (medium and low) the scale already follows the level's GPU budget with no component. Adding one states a budget of the world's own, which takes the scale over from the governor's; removing the last one gives it back.