Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::canvas::Canvas::NamedUniform Struct Reference

An arbitrary named shader uniform (name → float / vec2 / vec3 / vec4). More...

#include <canvas.hpp>

Public Attributes

std::string name
int count = 1
 1=float, 2=vec2, 3=vec3, 4=vec4
float v [4] = {0, 0, 0, 0}

Detailed Description

An arbitrary named shader uniform (name → float / vec2 / vec3 / vec4).

Lets a custom post-effect (save_layer_with_sksl_post_effect) accept any uniform its shader declares, not just the fixed widget vocabulary above — the difference between a real user-facing shader-effect API and a toy. count selects the arity (1..4); only that many of v are read. Bound via SkRuntimeEffectBuilder::uniform(name) guarded by findUniform, so names the shader doesn't declare are ignored.

Member Data Documentation

◆ count

int pulp::canvas::Canvas::NamedUniform::count = 1

1=float, 2=vec2, 3=vec3, 4=vec4

◆ name

std::string pulp::canvas::Canvas::NamedUniform::name

◆ v

float pulp::canvas::Canvas::NamedUniform::v[4] = {0, 0, 0, 0}

The documentation for this struct was generated from the following file:
  • /home/runner/work/pulp/pulp/core/canvas/include/pulp/canvas/canvas.hpp