Difference between revisions of "TouchDesigner learning"

From Antoine Vienne | Wiki
Jump to navigation Jump to search
(Get working Shadertoy shaders)
(Get Shadertoy shaders working)
Line 23: Line 23:
 
=== Get Shadertoy shaders working===
 
=== Get Shadertoy shaders working===
 
<pre>
 
<pre>
// Replace void mainImage( bla bla ) by void main()
+
// Replace in code void mainImage( bla bla ) by void main()
 +
 
 
// Then add at top of code:
 
// Then add at top of code:
  
Line 31: Line 32:
 
uniform float iTime;
 
uniform float iTime;
 
uniform float iFrame;
 
uniform float iFrame;
 +
 +
// In glsl node:
 +
// Declare iResolution and iTime
 +
// For iTime:
 +
absTime.seconds
 
</pre>
 
</pre>

Revision as of 23:49, 19 January 2021

Making custom interface

Making buttons

// Name of the parent node

parent().name

Rendering

Get resolution from another node

// Get width and height from render1 node

op('render1').width

op('render1').height


GLSL

Get Shadertoy shaders working

// Replace in code void mainImage( bla bla ) by void main()

// Then add at top of code:

layout(location = 0) out vec4 fragColor;

uniform vec3 iResolution;
uniform float iTime;
uniform float iFrame;

// In glsl node:
// Declare iResolution and iTime
// For iTime:
absTime.seconds