screenSpaceGI.package
This package holds more than this page lists. See all of its files in its world.
README.md
ScreenSpaceGI
The scene's runtime bounced light, authored and persisted like any other component. Add it to an entity and nearby lit surfaces start bouncing light onto each other: the floor beside a red wall turns red near the wall.
local id = entity.spawn("screen_space_gi").id
entity(id).component.add("ScreenSpaceGI", { intensity = 1.0, radius = 2.0 })
| field | effect |
|---|---|
intensity | How much of the gathered bounce reaches the image: 1 is physical, 0 turns it off, above 1 strengthens it past one bounce of the light on screen. |
radius | How far a surface gathers, in world units: the reach of the ambient occlusion's horizon search, which this sets for both. Only surfaces within it send light, so for a room's walls to tint the floor across the room, make it about the size of the room. |
quality | auto (the device's quality tier picks) | low | medium | high | ultra: what the gather costs and how clean it is. A strong intensity reads grainy at the half-resolution levels (low, medium) and smooth at high and ultra. |
occlusion | How far the occlusion the gather runs beneath darkens the indirect light, in [0, 1] (1 by default). At 0 the pass draws nothing, the gather with it. |
The light is the indirect gather of the ambient occlusion pass: the
component applies the ambient occlusion asset with intensity as its
indirect, occlusion as its intensity, and radius and quality as that
pass's own. A scene that also has an AmbientOcclusion component applies the
same asset twice, and the application that last stated something new is the
one in force: set indirect on the AmbientOcclusion component instead of
adding this one.
intensity = 1 sends the light the surfaces near each other really exchange.
A scene lit by one lamp in a dim room gets more of its look from bounce than
the screen holds (light from what is off screen or beyond radius is not
gathered), and a stylised look may want 2 to 3. Every field is live: editing
one in the inspector re-pushes it. Removing the last one in the scene takes the
bounce away and returns the image to what the lighting alone produced.