phosphor-pointer

Pointer shader packs: trails, halos, and click ripples around the cursor.

The fourth shader-pack family beside the overlay packs in phosphor-shaders, the transition packs in phosphor-animation, and the window packs in phosphor-surface: packs that decorate the mouse pointer with trails, halos, click ripples, and sparks. One effect.frag runs on both runtimes. The compositor paints it as a screen-space pass over the output under the pointer using loose uniforms, and the settings preview drives the same source on a Qt RHI ShaderEffect with a std140 tail appended after BaseUniforms. A pack ticks every frame while the pointer has recent motion or a recent button event, then the host stops repainting. PointerShaderRegistry discovers packs from disk through the shared Registry and MetadataPackLoader pair, with live reload and the generated p_<id> parameter accessors. PointerHistory is the ring-buffer sampler both hosts feed; it keeps the recent trail plus the last press and release and produces each frame's PointerFrameState. Rendering itself lives in the consumers.

Full API →

Key types

PointerShaderRegistry
Disk-backed discovery, live reload, and parameter-slot translation for pointer packs.
PointerShaderEffect
Parsed pack metadata: parameters, texture slots, trailSeconds, and whether the chain paints under or over the cursor.
PointerHistory
Ring-buffer pointer sampler: trail samples, last press and release, velocity, and the damage rect.
PointerFrameState
Plain-data snapshot of one frame's pointer uniforms, consumed by both hosts.
PointerUniformExtension
IUniformExtension that writes the pointer tail into the preview runtime's UBO.

Dependencies

See also

References