Expand description
Transient full-screen effects a game fires at moments: shockwaves, flashes, and a light-shaft source.
crate::config::RenderConfig is the standing look of the picture, the
grade and the bloom and the lens. This is what happens to the picture
when something happens in the game. A blow lands and a ring of refraction
runs out from the point of impact. A spell goes off and the frame flashes
its colour and falls back. A brazier or a boss’s eye becomes the source
that light shafts stream from.
All of it is stateful and decays on its own, so a game fires and forgets.
Coordinates are the same screen pixels the UI layer uses: (0, 0) at the
top left, y down.
Structs§
- Reflection
- A glossy floor: the picture mirrored about a horizontal line and laid back over itself below it, fading with distance from the line.
- Screen
Fx - Transient screen effects. Lives on the engine as
engine.fx. - Screen
Light - A light in screen space, for the light map.
- Shockwave
- One expanding ring of refraction.
Constants§
- MAX_
LIGHTS - The most lights the light map takes in one frame.
- MAX_
SHOCKWAVES - Hard cap on simultaneous shockwaves; the composite shader has a fixed uniform array of this size.