Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time

ORCΛ x Λioi x Veda


Make sure that ORCΛ is running UDP on port 49161 (Default)


Value should be float value. You need to add f character after send value.

Set first host to

Veda can set any port for listening by the way which describe in the next chapter. Temporally we set 5000 to it.


/*{ "osc": 5000 }*/

precision mediump float;

uniform vec2 resolution;
uniform sampler2D osc_sample;

void main() {
  vec2 uv = gl_FragCoord.xy / resolution;
  gl_FragColor = texture2D(osc_sample, uv);

/*{ "osc": 5000 }*/

Top of shader file, OSC listening port is set by one line code which is comment out.

uniform sampler2D osc_sample;

Veda receives OSC message as texture data. We have to access it from sampler2D type variable.

Variable name of sampler2D has rule that generate OSC address structure automativaly.

After word osc, each _ underbar separate address tree structure.


/foo -> sampler2D osc_foo

/foo/bar -> sampler2D osc_foo_bar

In our case, address should be /sample.

gl_FragColor = texture2D(osc_sample, uv);

Finally we can access value with texture2D function.

see reference