Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorSurfaceShaders::SurfaceShaderEffect::TextureSlot Struct Reference

User texture slot. More...

#include <PhosphorSurface/SurfaceShaderEffect.h>

Public Member Functions

bool operator== (const TextureSlot &other) const
bool operator!= (const TextureSlot &other) const

Public Attributes

QString path
 Filename relative to the effect's sourceDir.
QString wrap
 "clamp" / "repeat" / "mirror"; empty = runtime default. Other values are rejected by fromJson.

Detailed Description

User texture slot.

Each entry binds an asset file to one of the runtime's user-texture samplers (slot 0 / 1 / 2 here). The captured surface (uTexture0) is never user-declared.

path is resolved relative to the effect's sourceDir. Loading failures are non-fatal — the effect still installs and the affected sampler reads transparent black; a qCWarning logs the missing file. wrap accepts only "clamp", "repeat", "mirror", and the empty string (which selects the runtime default of clamp). Any other value is rejected by fromJson with a qCWarning and stored as empty. Up to three textures per effect; surplus entries are silently dropped at parse time.

These pack defaults are the ONLY texture source the compositor host uses. SurfaceShaderRegistry::translateSurfaceParams also emits uTexture1..3 and uTexture1..3_wrap override keys from a profile's parameters, and the daemon host applies them, but the compositor uploads from this list at first compile and caches for the pack's lifetime, so a profile that overrides a surface texture changes the decoration preview and not the window.

Member Function Documentation

◆ operator!=()

bool PhosphorSurfaceShaders::SurfaceShaderEffect::TextureSlot::operator!= ( const TextureSlot & other) const
inline

◆ operator==()

bool PhosphorSurfaceShaders::SurfaceShaderEffect::TextureSlot::operator== ( const TextureSlot & other) const
inline

Member Data Documentation

◆ path

QString PhosphorSurfaceShaders::SurfaceShaderEffect::TextureSlot::path

Filename relative to the effect's sourceDir.

◆ wrap

QString PhosphorSurfaceShaders::SurfaceShaderEffect::TextureSlot::wrap

"clamp" / "repeat" / "mirror"; empty = runtime default. Other values are rejected by fromJson.


The documentation for this struct was generated from the following file: