glsl-view module reference
glsl-view module reference
glsl-view integration via OSC.
index
- draw a GLSL shader via OSC.
- freeze a texture source.
- compile a GLSL shader with uniforms.
- step a frozen texture source.
- alias of
stream - load a texture-share-vk texture source.
- override uniform binding type.
- alias of
video
details
- draw a GLSL shader via OSC.
(draw [socket] shader)Syncs code and parameters with glsl-view via OSC.
socketmust be anosc/out~or read from*oscout*shaderis a struct~ withshader(str): GLSL sourceuniforms: struct mapping uniform names to values
- freeze a texture source.
(freeze [socket] source freeze?) - compile a GLSL shader with uniforms.
$shader"code…"A template string formatter for
glsl-view/drawthat returns a shader struct~.code…is a template string that can contain~-streamtemplate substitutions that are used as follows:str: substituted directly as GLSL- another shader struct~: substituted as GLSL, with uniforms lifted
{type: str val: …}: reference to uniform of GLSL-typetype(instead of inferred as follows)num,bool: reference touniform float/boolnum[I],bool[I]: reference touniform vecI/bvecInum[I][J]: reference touniform matIxJ
- step a frozen texture source.
(step! [socket] source [trig!]) - load a texture-share-vk texture source.
(tsv-source [socket] name [type])Creates a texture source from a texture-share-vk texture.
nameis a unique name for this texture source.typedefaults to2D.
- override uniform binding type.
(uniform glsl-type value)Generates a uniform struct as received by
glsl-view/shader:(uniform 'sampler2D' 'sampler-name')is equivalent to{'type' 'sampler2D' 'val' 'sampler-name'}.