Creates an image from Shadertoy’s variant of GLSL source code.
Shadertoy is a website that allows developers to write and share small text programs called Fragment Shaders that render graphics to a screen.
Shadertoy provides some special uniform
values that are exposed as port values on the node:
Time
— The current time that is passed to the shader. Usually you’ll want to connect a Fire on Display Refresh node’s Refreshed at Time
output to this port.Channel 0–3
— Images to be passed to the shader.Mouse Position
— The mouse position in Vuo Coordinates.Mouse is Pressed
— Whether the mouse button is pressed.To mimic the way the Shadertoy website handles interaction, connect the Check Mouse Status node’s corresponding ports to this node.
When typing in the Fragment Shader
port’s input editor, the Return and Tab keys type text as they normally would in a text editor (unlike most other text ports' input editors). To close the input editor, click away from it or press Command-Return.
Time
port. Some shaders require a time base to function correctly.iMouse
, make sure that you have connected the ports from Check Mouse Status to Mouse Position
and Mouse is Pressed
.Channel
port in Vuo match those on the website.textureLod
function, use the Improve Downscaling Quality node to mipmap the input image.This node only supports shaders that have a single Image tab. It doesn’t support shaders with additional tabs (Buffer, Sound, Common, Cubemap).
This node only supports images (textures) as Channel
inputs. It doesn’t support audio or other types of inputs.
This node uses GLSL 1.20. Features that were added in later versions of GLSL, such as switch
statements, may not be supported.
vec3 iResolution
— The output image size, in pixels.float iTime
— The value of the Time
port.float iTimeDelta
— The elapsed Time
since the prior frame.int iFrame
— The number of frames rendered since the composition started.sampler2D iChannel0, iChannel1, iChannel2, iChannel3
— The texture sampler for each input image.vec3 iChannelResolution[4]
— The size of each input image, in pixels.vec4 iMouse
iMouse.xy
— When the mouse button is pressed, this is the current mouse position (in pixels). Updates continuously while the mouse button is pressed; freezes when the mouse button is released.iMouse.zw
— When the mouse button is pressed, this is the position (in pixels) where the button was pressed. When it’s released, this is the position where it was released.vec4 iDate
iDate.x
— The current year.iDate.y
— The current month.iDate.z
— The current day.iDate.w
— The number of seconds (including fractional seconds) since midnight.Keywords: fragment, glsl, graphics, opengl, pixel, scenegraph