|
| constexpr const char * | kITime = "iTime" |
| | float iTime — seconds since the current burst of pointer activity began.
|
| constexpr const char * | kIResolution = "iResolution" |
| | vec2 iResolution — canvas size in device px.
|
| constexpr const char * | kIMouse = "iMouse" |
| | vec4 iMouse — .xy pointer position in canvas px, .zw = .xy /
iResolution.
|
| constexpr const char * | kCustomParamsArray = "customParams" |
| | vec4 customParams[8] / vec4 customColors[16] — declared parameter slots.
|
| constexpr const char * | kCustomColorsArray = "customColors" |
| constexpr const char * | kIChannelResolution = "iChannelResolution" |
| | vec4 iChannelResolution[4] — multipass buffer sizes (.xy).
|
| constexpr const char * | kITextureResolution = "iTextureResolution" |
| | vec4 iTextureResolution[4] — user texture sizes (.xy).
|
| constexpr const char * | kUPointerVelocity = "uPointerVelocity" |
| | vec4 uPointerVelocity — .xy device px/s, .z speed (length), .w the filtered speed over the current stroke (PointerFrameState::filteredSpeed, read by pointerFilteredSpeed()).
|
| constexpr const char * | kUPointerPress = "uPointerPress" |
| | vec4 uPointerPress — .xy canvas px of the last button press, .z seconds since it (kNeverSeconds when none this session), .w button (1 left, 2 right, 3 middle, 0 none).
|
| constexpr const char * | kUPointerRelease = "uPointerRelease" |
| | vec4 uPointerRelease — same shape as uPointerPress for the last release.
|
| constexpr const char * | kUPointerState = "uPointerState" |
| | vec4 uPointerState — .x pressed-button bitmask as float (1 left, 2 right, 4 middle), .y seconds since the last motion, .z logical-to-device scale, .w trail point count actually filled (0..32).
|
| constexpr const char * | kUCursorRect = "uCursorRect" |
| | vec4 uCursorRect — cursor sprite rect in canvas px (x, y, w, h) with the hotspot already applied, so it is where the sprite is drawn.
|
| constexpr const char * | kUPointerFlags = "uPointerFlags" |
| | vec4 uPointerFlags — .x = 1.0 when uCursorSprite is bound (needsCursor honoured), else 0.
|
| constexpr const char * | kUPointerTrail = "uPointerTrail" |
| | vec4 uPointerTrail[32] — newest first.
|
| constexpr const char * | kUCursorSprite = "uCursorSprite" |
| | sampler2D uCursorSprite — the cursor image, bound only for packs that declare needsCursor.
|
| constexpr const char * | kUTexture1 = "uTexture1" |
| | sampler2D uTexture1..3 — user-declared image textures (metadata textures).
|
| constexpr const char * | kUTexture2 = "uTexture2" |
| constexpr const char * | kUTexture3 = "uTexture3" |
| constexpr const char * | kIChannel0 = "iChannel0" |
| | sampler2D iChannel0..3 — multipass buffers, declared by the opt-in pointer_multipass.glsl include (bindings 2-5 on the UBO runtime, the FIRST FOUR of the shared table's eight-wide channel block).
|
| constexpr const char * | kIChannel1 = "iChannel1" |
| constexpr const char * | kIChannel2 = "iChannel2" |
| constexpr const char * | kIChannel3 = "iChannel3" |
| constexpr int | kMaxTrailPoints = 32 |
| | Ring capacity of uPointerTrail.
|
| constexpr int | kMaxCustomParams = PhosphorShaders::CustomParams::kVecCount |
| | Number of vec4 slots in customParams (8).
|
| constexpr int | kMaxCustomColors = PhosphorShaders::CustomColors::kColorCount |
| | Number of customColors slots (16).
|
| constexpr int | kMaxParameterSlots = PhosphorShaders::CustomParams::kFlatSlotCount |
| | Number of float sub-slots (4 × 8 = 32), the per-effect scalar budget.
|
| constexpr int | kMaxUserTextureSlots = 3 |
| | Maximum number of user-declared textures per pointer effect.
|
| constexpr int | kMaxBufferPasses = 2 |
| | Maximum number of buffer passes a pointer pack may declare.
|
| constexpr int | kMaxDeclaredParameters = 48 |
| | Maximum number of declared parameters a pack may carry across both pools.
|
| constexpr double | kPointerCurveTension = 0.25 |
| | Catmull-Rom tension used by every path pack's curve, mirroring kPointerCurveTension in data/pointer/shared/pointer_lib.glsl.
|
| constexpr int | kPointerCurveSteps = 4 |
| | Straight pieces each path pack walks per curve span, mirroring kPointerCurveSteps in data/pointer/shared/pointer_lib.glsl.
|
| constexpr double | kNeverSeconds = 1.0e6 |
| | The "none this session" sentinel for the seconds-since lanes of uPointerPress.z, uPointerRelease.z and uPointerState.y: what the tail carries before the first press, release or motion.
|
| constexpr double | kPreviewPeakSpeedPxPerSecond = 324.0 |
| | Peak speed, in px per second, that the settings preview's simulated pointer ever reaches.
|
Cross-runtime named-uniform contract for pointer shaders.
Pointer packs (data/pointer/<id>/) decorate the mouse pointer: trails, halos, click ripples, sparks. They are the fourth shader family beside the overlay, animation and surface categories and are modelled on the surface contract: one effect.frag runs on both runtimes.
• Compositor execution — the kwin-effect paints the chain as a screen-space pass over the composited scene of the output under the pointer. Classic GL, loose uniforms (the #ifdef PLASMAZONES_KWIN branch of data/pointer/shared/pointer_uniforms.glsl).
• Preview execution — the settings app drives the same source on the Qt-RHI ShaderEffect node. std140 UBO at binding 0 = PhosphorShaders::BaseUniforms followed by the pointer tail (PointerUniformsTail, see PointerShaderUniforms.h).
A pointer pack is a CONTINUOUS decoration: it ticks every frame while the pointer has recent motion or a recent button event, then the host stops repainting until the next event (PointerShaderEffect::trailSeconds). Click reactions are expressed through the press / release event uniforms inside that same continuous contract, so there is one family, not a decoration arm plus an animation arm.
- Canvas
- The canvas is the whole output in device px, top-down, origin at the output's top-left. Every position uniform is in that space and iResolution.xy is the output size in device px.
- Per-effect declared parameters
- Identical mechanism to the surface contract: float / int / bool parameters fill customParams[0].x … customParams[7].w (32 slots), colour parameters fill customColors[0] … customColors[15] (16 slots), both in metadata declaration order with independent allocators. PointerShaderRegistry::translatePointerParams converts a friendly map into the slot-keyed map both runtimes consume and PointerShaderRegistry::paramPreamble generates the #define p_<id> accessors packs read.
| double PhosphorPointerShaders::PointerShaderContract::kPreviewPeakSpeedPxPerSecond = 324.0 |
|
inlineconstexpr |
Peak speed, in px per second, that the settings preview's simulated pointer ever reaches.
The preview stage is PreviewCanvas.size (420x236) and its pointer traces a Lissajous figure eight over a 4 second lap, so the two axes have amplitude 158.1 px at 1.571 rad/s and 66.1 px at 3.142 rad/s. Both terms peak together at the start of the lap, giving hypot(158.1 * 1.571, 66.1 * 3.142) which is a little under 324.
It lives here because it is a fact about how every pointer pack is judged, and the validator lints a pack's speed-gate default against it: a default above this means the gate never opens on the lap, so the pack previews as a blank stage however well it behaves on a real desktop. That is how the windtrail pack shipped invisible.
PointerPreviewCanvas.qml owns the lap this is derived from. Changing the stage size, the lap duration or the inset changes this number too.