6#include <PhosphorSurface/phosphorsurface_export.h>
11#include <QAnyStringView>
295 "kMinBufferScale must be positive and strictly less than kMaxBufferScale");
350 if (QAnyStringView::equal(param.id,
id)) {
389 return !(*
this == other);
416 return !(*
this == other);
Q_DECLARE_TYPEINFO(PhosphorSurfaceShaders::SurfaceShaderEffect::TextureSlot, Q_RELOCATABLE_TYPE)
constexpr double kMaxBufferScale
Definition CustomParamsKey.h:37
constexpr double kMinBufferScale
Lower / upper bounds on a multipass bufferScale (FBO downscale factor).
Definition CustomParamsKey.h:36
QMap< QString, QVariantMap > PackPresets
Pack-declared named parameter presets: preset name → { paramId → value }.
Definition ShaderPresetParse.h:32
constexpr int kMaxBufferPasses
Maximum number of multipass buffer passes a pack may declare.
Definition CustomParamsKey.h:68
Definition DecorationProfile.h:31
Declared shader inputs beyond the standard surface set (uTexture0, uSurfaceSize, uSurfaceFocused,...
Definition SurfaceShaderEffect.h:331
QString type
"float", "int", "bool", "color"
Definition SurfaceShaderEffect.h:334
QVariant minValue
JSON/QML key: min.
Definition SurfaceShaderEffect.h:338
QString id
Definition SurfaceShaderEffect.h:332
QVariant stepValue
Optional slider step; JSON/QML key: step. QML falls back to (max-min)/200.
Definition SurfaceShaderEffect.h:340
QString description
Optional one-line tooltip for the settings UI.
Definition SurfaceShaderEffect.h:335
QString group
Optional accordion group name for the settings UI.
Definition SurfaceShaderEffect.h:336
QString name
Definition SurfaceShaderEffect.h:333
QVariant maxValue
JSON/QML key: max.
Definition SurfaceShaderEffect.h:339
QVariant defaultValue
JSON/QML key: default.
Definition SurfaceShaderEffect.h:337
User texture slot.
Definition SurfaceShaderEffect.h:378
bool operator!=(const TextureSlot &other) const
Definition SurfaceShaderEffect.h:387
bool operator==(const TextureSlot &other) const
Definition SurfaceShaderEffect.h:383
QString wrap
"clamp" / "repeat" / "mirror"; empty = runtime default. Other values are rejected by fromJson.
Definition SurfaceShaderEffect.h:381
QString path
Filename relative to the effect's sourceDir.
Definition SurfaceShaderEffect.h:379
Metadata for a single surface shader effect.
Definition SurfaceShaderEffect.h:81
static constexpr qreal kMinBufferScale
Lower / upper bounds on bufferScale (multipass FBO downscale factor) — forwarders onto the cross-libr...
Definition SurfaceShaderEffect.h:292
PhosphorShaders::PackPresets presets
Pack-declared named parameter presets: preset name -> { paramId -> value }.
Definition SurfaceShaderEffect.h:403
static constexpr qreal kMaxBufferScale
Definition SurfaceShaderEffect.h:293
QList< TextureSlot > textures
Definition SurfaceShaderEffect.h:392
QString bufferFilter
Default filter mode for all buffer samplers.
Definition SurfaceShaderEffect.h:266
QStringList bufferWraps
Per-buffer wrap-mode overrides; index aligns with bufferShaderPaths.
Definition SurfaceShaderEffect.h:262
QList< ParameterInfo > parameters
Definition SurfaceShaderEffect.h:342
bool operator==(const SurfaceShaderEffect &other) const
QString version
Semantic version of this effect pack.
Definition SurfaceShaderEffect.h:95
QString category
Category for settings-UI grouping.
Definition SurfaceShaderEffect.h:100
const ParameterInfo * findParameter(QAnyStringView id) const
The declared parameter with id id, or nullptr when the pack does not declare it.
Definition SurfaceShaderEffect.h:347
QJsonObject toJson() const
bool useDepthBuffer
Allocate a depth buffer alongside the colour FBO so the shader can sample window depth.
Definition SurfaceShaderEffect.h:274
bool isValid() const
Definition SurfaceShaderEffect.h:405
bool isMultipass
Opt-in multipass mode.
Definition SurfaceShaderEffect.h:138
QString sourceDir
Resolved absolute directory containing this effect's assets.
Definition SurfaceShaderEffect.h:123
QStringList bufferFilters
Per-buffer filter-mode overrides; index aligns with bufferShaderPaths.
Definition SurfaceShaderEffect.h:270
QString previewPath
Preview image path (relative to the effect dir). For settings UI.
Definition SurfaceShaderEffect.h:129
bool isUserEffect
Whether this effect was loaded from a user-local directory.
Definition SurfaceShaderEffect.h:126
static SurfaceShaderEffect fromJson(const QJsonObject &obj)
QList< qreal > bufferScales
Per-pass render-target scales, positionally aligned with bufferShaderPaths (metadata bufferScales).
Definition SurfaceShaderEffect.h:253
bool providesBorder
Declares that the pack draws a window border of its own (the border family: border,...
Definition SurfaceShaderEffect.h:198
QString description
One-line description for settings UI tooltips.
Definition SurfaceShaderEffect.h:89
QStringList bufferShaderPaths
Buffer-pass shader paths (relative to effect dir).
Definition SurfaceShaderEffect.h:227
static constexpr int kMaxBufferPasses
Maximum number of buffer passes a pack may declare.
Definition SurfaceShaderEffect.h:311
bool needsBackdrop
Declares that the pack samples the scene BEHIND the window (backdropTexel() / uBackdrop).
Definition SurfaceShaderEffect.h:169
bool providesOpacityTint
Declares that the pack fades/tints the window surface (the reserved opacity-tint pack).
Definition SurfaceShaderEffect.h:206
bool interiorOpaque
Declares that the pack never writes a texel with alpha below the input's alpha INSIDE the window's na...
Definition SurfaceShaderEffect.h:185
qreal bufferScale
Render-target scale relative to the surface size, for every buffer pass that bufferScales does not na...
Definition SurfaceShaderEffect.h:238
QString bufferWrap
Default wrap mode for all buffer samplers.
Definition SurfaceShaderEffect.h:258
bool animated
Declares that the pack references iTime and needs a per-frame driver.
Definition SurfaceShaderEffect.h:158
QString vertexShaderPath
Path to the vertex shader (relative to the effect dir).
Definition SurfaceShaderEffect.h:120
bool audio
Declares that the pack reacts to the CAVA audio spectrum (it includes surface_audio....
Definition SurfaceShaderEffect.h:215
QString name
Human-readable display name (localizable by the consumer).
Definition SurfaceShaderEffect.h:86
QString author
Author attribution.
Definition SurfaceShaderEffect.h:92
bool bufferFeedback
Enable per-pass feedback (last frame's buffer is sampleable as iChannel<N>).
Definition SurfaceShaderEffect.h:231
bool halfFloatBuffers
Whether the intermediate buffers hold half-float texels.
Definition SurfaceShaderEffect.h:284
QString id
Stable identifier — lookup key in the registry.
Definition SurfaceShaderEffect.h:83
QString paddingParam
Names the parameter (an int/float, logical px) whose resolved value is the transparent OUTER MARGIN t...
Definition SurfaceShaderEffect.h:151
bool operator!=(const SurfaceShaderEffect &other) const
Definition SurfaceShaderEffect.h:414
QString fragmentShaderPath
Path to the fragment shader (relative to the effect dir).
Definition SurfaceShaderEffect.h:105