37namespace CustomParams {
55 return QStringLiteral(
"customParams") + QString::number(vec + 1) + QLatin1Char(
'_') + QLatin1Char(comp);
74 static constexpr char kComponents[4] = {
'x',
'y',
'z',
'w'};
75 return slotKey(slot / 4, kComponents[slot & 3]);
90 static constexpr char kComponents[4] = {
'x',
'y',
'z',
'w'};
91 return QStringLiteral(
"customParams[") + QString::number(slot / 4) + QStringLiteral(
"].")
92 + QLatin1Char(kComponents[slot & 3]);
124namespace CustomColors {
138 return QStringLiteral(
"customColor") + QString::number(slot + 1);
151 return QStringLiteral(
"customColors[") + QString::number(slot) + QLatin1Char(
']');
QString colorKey(int slot)
Format a customColor key from a 0-based slot index.
Definition CustomParamsKey.h:133
QString glslAccessor(int slot)
GLSL author-facing accessor for a color slot — the form a shader author reads in fragment source,...
Definition CustomParamsKey.h:146
constexpr int kColorCount
Number of color slots in BaseUniforms::customColors[16].
Definition CustomParamsKey.h:127
QString slotKey(int vec, char comp)
Format a customParams slot key from explicit (vec, comp) pair.
Definition CustomParamsKey.h:53
constexpr int kVecCount
Number of vec4 slots in BaseUniforms::customParams[8].
Definition CustomParamsKey.h:40
constexpr int kFlatSlotCount
Number of float sub-slots across all vec4s (4 × kVecCount).
Definition CustomParamsKey.h:46
QString glslAccessor(int slot)
GLSL author-facing accessor for a flat scalar sub-slot — the form a shader author reads in fragment s...
Definition CustomParamsKey.h:85
Definition ShaderEffect.h:30