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- other values are implicitly converted as by
glsl-view/uniform
- 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 the tsv name of this texture source.typedefaults to2D.
- override uniform binding type.
(uniform [glsl-type] value)Label an alive value with a GLSL type:
(uniform 'sampler2D' 'sampler-name')is equivalent to{'type' 'sampler2D' 'val' 'sampler-name'}.When absent,
glsl-typeis inferred based on the type ofvalue:num,bool:uniform float/boolnum[I],bool[I]:uniform vecI/bvecInum[I][J]:uniform matIxJ