One declared shader parameter, in metadata declaration order, as fed to buildParamPreamble.
More...
#include <phosphor-shaders/include/PhosphorShaders/ShaderParamPreamble.h>
Public Types | |
| enum class | Pool { Scalar , Color , Image } |
| Which UBO region the parameter occupies. More... | |
Public Attributes | |
| QString | id |
| Pool | pool = Pool::Scalar |
| int | explicitSlot = -1 |
| Explicit slot from metadata, or -1 to auto-assign by declaration order within the parameter's pool. | |
One declared shader parameter, in metadata declaration order, as fed to buildParamPreamble.
The generator turns a list of these into the #define p_<id> <glsl-accessor> block both shader runtimes inject so an author reads a parameter by name (p_speed) instead of hand-decoding a customParams[N].xyzw lane.
|
strong |
Which UBO region the parameter occupies.
The three pools number independently (a color does not consume a scalar sub-slot). • Scalar — float / int / bool → customParams[N].<xyzw> • Color — color → customColors[N] • Image — image/texture → uTexture<N> (overlay/zone only; animation packs declare textures separately and never use this pool)
| Enumerator | |
|---|---|
| Scalar | |
| Color | |
| Image | |
| int PhosphorShaders::PreambleParam::explicitSlot = -1 |
Explicit slot from metadata, or -1 to auto-assign by declaration order within the parameter's pool.
Overlay (zone) packs currently carry explicit slots; animation packs always auto-assign. The resolved slot MUST match the slot the runtime uploads the value to, or p_<id> reads the wrong lane — callers pass whichever the runtime uses.
| QString PhosphorShaders::PreambleParam::id |
| Pool PhosphorShaders::PreambleParam::pool = Pool::Scalar |