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.
socket
must be anosc/out~
or read from*oscout*
shader
is 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/draw
that returns a shader struct~.code…
is a template string that can contain~-stream
template 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/bool
num[I]
,bool[I]
: reference touniform vecI/bvecI
num[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.
name
is a unique name for this texture source.type
defaults 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'}
.