GPU uniform buffer layout following std140 rules (base region). More...
#include <phosphor-shaders/include/PhosphorShaders/BaseUniforms.h>
Public Attributes | |
| float | qt_Matrix [16] |
| float | qt_Opacity |
| float | iTime |
| float | iTimeDelta |
| int | iFrame |
| float | iResolution [2] |
| int | appField0 |
| int | appField1 |
| float | iMouse [4] |
| float | iDate [4] |
| float | customParams [8][4] |
| float | customColors [16][4] |
| float | iChannelResolution [4][4] |
| int | iAudioSpectrumSize |
| int | iFlipBufferY |
| int | _pad_after_audioSpectrum [2] |
| float | iTextureResolution [4][4] |
| float | iTimeHi |
| int | iIsReversed |
| int | _pad_after_iIsReversed [2] |
GPU uniform buffer layout following std140 rules (base region).
This is the generic Shadertoy-compatible portion of the UBO. Consumers append application-specific data after this block via IUniformExtension.
The render node allocates sizeof(BaseUniforms) + extension->extensionSize() bytes for the UBO, writes the base region itself, and calls extension->write() for the remainder.
Use them when you have a small (≤2 ints), frequently-updated piece of state that needs to live INSIDE BaseUniforms (rather than the extension region) — typically because the fragment shader reads them on every pixel and you want them on the same cache line as iResolution. For larger or differently-shaped state, implement IUniformExtension.
The library writes them via the K_APP_FIELDS UBO region (8 bytes) so frequent updates don't trigger a full scene-header re-upload. Consumers that don't use them should leave them at 0.
| int PhosphorShaders::BaseUniforms::_pad_after_audioSpectrum[2] |
| int PhosphorShaders::BaseUniforms::_pad_after_iIsReversed[2] |
| int PhosphorShaders::BaseUniforms::appField0 |
| int PhosphorShaders::BaseUniforms::appField1 |
| float PhosphorShaders::BaseUniforms::customColors[16][4] |
| float PhosphorShaders::BaseUniforms::customParams[8][4] |
| int PhosphorShaders::BaseUniforms::iAudioSpectrumSize |
| float PhosphorShaders::BaseUniforms::iChannelResolution[4][4] |
| float PhosphorShaders::BaseUniforms::iDate[4] |
| int PhosphorShaders::BaseUniforms::iFlipBufferY |
| int PhosphorShaders::BaseUniforms::iFrame |
| int PhosphorShaders::BaseUniforms::iIsReversed |
| float PhosphorShaders::BaseUniforms::iMouse[4] |
| float PhosphorShaders::BaseUniforms::iResolution[2] |
| float PhosphorShaders::BaseUniforms::iTextureResolution[4][4] |
| float PhosphorShaders::BaseUniforms::iTime |
| float PhosphorShaders::BaseUniforms::iTimeDelta |
| float PhosphorShaders::BaseUniforms::iTimeHi |
| float PhosphorShaders::BaseUniforms::qt_Matrix[16] |
| float PhosphorShaders::BaseUniforms::qt_Opacity |