Render TOP

From Derivative
Jump to navigation Jump to search

Summary
[edit]

The Render TOP is used to render all 3D scenes in TouchDesigner. You need to give it a Camera object and a Geometry object as a minimum.

The Geometry object needs to have a Material assigned to it. Materials can be pre-packaged ones like the Phong material, or they can be OpenGL GLSL shaders. All textures and bump maps in TouchDesigner materials are TOPs, i.e. files must be read in via Movie File In TOPs.

Rendering in TouchDesigner ties in nicely with compositing via the Render TOP and all other TOPs.

The Render TOP renders in many RGBA and single-channel formats, in 8-bit fixed-point up to to 32-bit floating point per pixel component.

It can render transparent surfaces correctly using Multi-Pass Depth Peeling. See below: Order Independent Transparency.

Multiple Cameras: The Render TOP is able to render multiple cameras (more quickly than separately) in a single node. You specify multiple cameras in one Camera parameter, and use Render Select TOP to pull out those camera results. This feature is even faster on GPUs that support Multi-Camera Rendering.

Multiple Images out: The Render TOP, working with the GLSL MATs, can output multiple image at arbitrary formats, through the Images page.

See also Rendering, all the articles in the Rendering Category, the Render Pass TOP, and the troubleshooting page Why is My Render Black.

NOTE: If you are doing non-realtime GPU-intensive renders (ones that take multiple seconds to render a single SOP), see the note in Windows GPU Driver Timeouts in the Movie File Out TOP.

PythonIcon.pngrenderTOP_Class


Parameters - Render Page

Camera(s) camera - Specifies which Cameras to look through when rendering the scene. You can specify multiple cameras and retrieve each camera image using the Render Select TOP.

Multi-Camera Hint multicamerahint - - Helps the Render TOP optimize rendering when multiple cameras are used. Controls the Multi-Camera Rendering behavior for this node.

  • Automatic automatic - The node will decide based on the GPU and setup if Multi-Camera Rendering can be used and enable it if possible. Currently Multi-Camera rendering works for 2D and Cube Map renders on supported GPUs. For 2D renders multiple cameras can not be rendered in a single pass if their 'Camera Light Mask' parameters don't result in the same lights being used in the scene. Use of Depth Peeling or Order Independent Transparency will also disable Multi-Camera rendering.
  • Off (One Pass Per Camera) off - Forces Multi-Camera Render to be disabled, so each camera is rendered one pass at a time.
  • X-Offset Stereo Cameras stereocameras - Should be set only if the pair of cameras have transform/projection matrices that result in a difference only in the X-axis after being applied, as is the case for most VR headsets. Other differences between the cameras such as FOV, near/far plane etc will be ignored, and the values form the first camera will be used. This hint allows the TOP to run faster for this particular case, when appropriate hardware is available.

Geometry geometry - Specifies which Geometry will be included in the rendered scene. You can use Pattern Matching to specify objects using patterns. Example: geo* ^geo7 will render all Geometry components whose names start with geo except geo7.

Lights lights - Specifies which Lights will be used to render the scene. You can use Pattern Matching here as well.

Anti-Alias antialias - - Sets the level of anti-aliasing in the scene. Setting this to higher values uses more graphics memory.

  • 1x (Off) aa1 -
  • 2x aa2 -
  • 4x aa4 -
  • 8x (Medium) aa8mid -
  • 8x (High) aa8high -
  • 16x (Low) aa16low -
  • 16x (Medium) aa16mid -
  • 16x (High) aa16high -
  • 32x aa32 -

Render Mode rendermode - - You can render different projections: normal 2D, Cube Map, Fish Eye (180), or Dual Paraboloid. The Cube Map renders 6 views as needed for environment maps in the Phong MAT and Environment Light COMP.

See also the Cube Map TOP and the Projection TOP.

  • 2D render2d -
  • Cube Map cubemap -
  • Fish-Eye (180) fisheye180 -
  • Dual Paraboloid dualparaboloid -
  • UV Unwrap uvunwrap -

Positive Sides posside - - When Render Mode is Cube Map, specify which sides if the cube map are rendered, +X, +Y, or +Z.

  • Positive Sides possidex -
  • Positive Sides possidey -
  • Positive Sides possidez -

Negative Sides negside - - When Render Mode is Cube Map, specify which sides if the cube map are rendered, -X, -Y, or -Z.

  • Negative Sides negsidex -
  • Negative Sides negsidey -
  • Negative Sides negsidez -

UV Unwrap Coord uvunwrapcoord - - When Render Mode is UV Unwrap Coord, select which Texture Layer the coordinates are rendered to,

  • Texture Layer 0 (uv[0-2]) uv0 -
  • Texture Layer 1 (uv[3-5]) uv1 -
  • Texture Layer 2 (uv[6-8]) uv2 -
  • Texture Layer 3 (uv[9-11]) uv3 -
  • Texture Layer 4 (uv[12-14]) uv4 -
  • Texture Layer 5 (uv[15-17]) uv5 -
  • Texture Layer 6 (uv[18-20]) uv6 -
  • Texture Layer 7 (uv[21-23]) uv7 -

UV Unwrap Coord Attribute uvunwrapcoordattrib -

Transparency transparency - - Helps to render transparent geometry in proper depth order. This eliminates the need to sort the geometry based on distance from camera. This process is multi-pass. For every pixel the closest surface is rendered in the first pass, the second closest surface second, up to the number of passes specified by the Transparency Passes parameter below. Turning this option on will disable some advanced features in the Render TOP, as well as anti-aliasing.

The feature is a pixel-based approach, not object-based. So its performance is not directly related to the number of objects, but rather how they are layered.

It uses a technique called Depth Peeling. First you render the normal frame. On your next render you peel away all of the pixels you saw in the first frame, and reveal the pixels underneath them. The next frame you do the same, peeling away the pixels you could see from the 2nd render. And so on. Once all of the renders are done, you re composite each layer Over the other, starting at the farthest back layer.

If you take a sphere for example, you'll need to do 2 passes, the first one for the front of the sphere, and then 2nd will be the inside of the sphere.

If you have 10 spheres, one behind the other. You'll need 19-20 passes to get the correct image.

If you have 10 spheres, each next to each other across the screen, you'll only need 2 passes.

In reality though you will only need 3-5 passes to get an image that's acceptable. It may not be 100% correct, but it'll look pretty close to correct.

Each pass is a full render, so each pass adds significant overhead.

  • Sorted Draw with Blending sortedblending -
  • Order Independent Transparency orderind -
  • Alpha-to-Coverage alphatocoverage -

Depth Peel depthpeel - Depth peeling is a technique used as part of Order-Independent Transparency, but this parameter allows you to use it in a different way. This parameter enables rendering depth-peels, but without combining all the layers using blending to create order independent transparency. Instead is keeps all the layers separate and they can be retrieved using a Render Select TOP. Depth peeling is done by first rendering rendering geometry normally and saving that image and depth. Then another render is done but the closest pixels that were occluded by the previous pass are written to the color buffer instead. This can be done multiple times, each time peeling back farther into the scene. If you are rendering a sphere the first render will be the outside of the sphere, and the second peel layer will be the back-inside of the sphere.

Transparency/Peel Layers transpeellayers - Number of passes the renderer will use when Order Independant Transparency is turned on.


Parameters - Advanced Page

Render render - Enables rendering; 1 = on, 0 = off.

Dither dither - Dithers the rendering to help deal with banding and other artifacts created by precision limitations of 8-bit displays.

Color Output Needed coloroutputneeded - This is an optimization if you don't actually need the color result from this pass. Turning this off avoids a copy from the offscreen render buffer to the TOP's texture. When anti-aliasing is enabled, turning this off will also avoid 'resolving' the anti-aliasing.

Draw Depth Only drawdepthonly - This will cause the render to only draw depth values to the depth buffer. No color values will be created. To make use of the depth buffer, use the Depth TOP.

# of Color Buffers numcolorbufs - Any shader you write can output to more than one RGBA buffer at a time. For GLSL 3.3+ you would use the layout(location = 1) specifier on an out variable in the pixel shader to write to the 2nd buffer. In GLSL 1.2 instead of writing to gl_FragColor in your shader, you write to gl_FragData[i] where i is the color buffer index you want to write the value to.

Allow Blending for Extra Buffers allowbufblending - Controls if blending (as enabled by the MAT common page setting) will be enabled for extra buffers beyond the first one. Often the extra buffers are used to write other types of information such as normals or positions, where blending wouldn't be desirable.

Depth Buffer Format depthformat - - Use either a 24-bit Fixed-Point or 32-bit Floating-Point depth buffer (single channel image).

  • 24-Bit Fixed-Point fixed24 -
  • 32-Bit Floating-Point float32 -

Cull Face cullface - - Front Faces, Back Faces, Both Faces, Neither. Will cause the render to avoid rendering certain polygon faces depending on their orientation to the camera. Refer to Back-Face Culling for more information.

  • Neither neither -
  • Back Faces backfaces -
  • Front Faces frontfaces -
  • Both Faces bothfaces -

Override Material overridemat - This allows you to specify a material that will be applied to every Geometry that is rendered in the Render TOP. It is useful for pre-processing passes where we are outputting information about the geometry rather then lighting them and outputting RGB.

Polygon Depth Offset polygonoffset - This feature pushes the polygons back into space a tiny fraction. This is useful when you are rendering two polygons directly ontop of each other and are experiencing Z-Fighting. Refer to Polygon Depth Offset for more information. This is also an important feature when doing shadows.

Offset Factor polygonoffsetfactor - Adds an offset to the Z value that depends on how sloped the surface is to the viewer.

Offset Units polygonoffsetunits - Adds a constant offset to the Z value.

Display Overdraw overdraw - This feature visually shows the overdraw in the scene. Refer to the Early Depth-Test article for more information. In particular the Analyzing Overdraw section.

Overdraw Limit overdrawlimit - This value quantizes the outputted color value to some # of overdraws. Refer to the Early Depth-Test for more information.


Parameters - Crop Page

Cropping here occurs using the projection matrix. It reduces the amount of the output render that is visible, without changing the resolution. It's particuarly useful to create sub-portion of an overall render in different buffers, such as for rendering across multiple instances of TouchDesigner. Be careful to set the aspect ratio of the Render TOP to match the 'real' aspect of the overall output image, not the aspect of this subsection. Otherwise the projection will be stretched incorrectly.

Crop Left cropleft - Positions the left edge of the rendered image.

Crop Left Unit cropleftunit - - Select the units for this parameter from Pixels, Fraction (0-1), Fraction Aspect (0-1 considering aspect ratio).

  • P pixels -
  • F fraction -
  • A fractionaspect -

Crop Right cropright - Positions the right edge of the rendered image.

Crop Right Unit croprightunit - - Select the units for this parameter from Pixels, Fraction (0-1), Fraction Aspect (0-1 considering aspect ratio).

  • P pixels -
  • F fraction -
  • A fractionaspect -

Crop Bottom cropbottom - Positions the bottom edge of the rendered image.

Crop Bottom Unit cropbottomunit - - Select the units for this parameter from Pixels, Fraction (0-1), Fraction Aspect (0-1 considering aspect ratio).

  • P pixels -
  • F fraction -
  • A fractionaspect -

Crop Top croptop - Positions the top edge of the rendered image.

Crop Top Unit croptopunit - - Select the units for this parameter from Pixels, Fraction (0-1), Fraction Aspect (0-1 considering aspect ratio).

  • P pixels -
  • F fraction -
  • A fractionaspect -


Parameters - Samplers Page

Uniform Name uni0name - The uniform name, as declared in the shader.

Value uni0value - -

  • Value uni0valuex -
  • Value uni0valuey -
  • Value uni0valuez -
  • Value uni0valuew -


Parameters - Uniforms Page

Sampler Name top0name - This is the sampler name that the GLSL program will use to sample from this TOP. The samplers need to be declared as the same dimensions as the TOP (sampler2D for a 2D TOP, sampler3D for 3D TOP).

TOP top0top - - This is the TOP that will be referenced by the above sampler name above it.

Extend U top0extendu - -
  • Hold hold -
  • Zero zero -
  • Repeat repeat -
  • Mirror mirror -
Extend V top0extendv - -
  • Hold hold -
  • Zero zero -
  • Repeat repeat -
  • Mirror mirror -
Extend W top0extendw - -
  • Hold hold -
  • Zero zero -
  • Repeat repeat -
  • Mirror mirror -
Filter top0filter - -
  • Nearest nearest -
  • Linear linear -
  • Mipmap Linear mipmaplinear -
Anisotropic Filter top0anisotropy - -
  • Off off -
  • 2x 2x -
  • 4x 4x -
  • 8x 8x -
  • 16x 16x -


Parameters - Images Page

Images are texture data that can be both read and written to at arbitrary pixels during a render operation, using a GLSL MAT, via the imageStore() and imageLoad(). You can obtain the results of the Image after the render is completed using a Render Select TOP. The images will automatically be declared for you inside of the shader, you should not declare them yourself (as you do for other uniforms). This is because there is a lot of extra decoration required for the image uniforms. Currently when compiling in the GLSL MAT itself your code will result in an error, since the images are not available there. However when you apply your MAT to a geometry and render it via the Render TOP, a new version of your shader will be included that has that image declared. Refer to Write_a_GLSL_Material#Image_Outputs for more information.

Name image0name - The uniform name for the image.

Array Length image0arraylength - If this value is 1 or greater, then the uniform is declared as an array and should be accessed using []. If this is 0 then it is not an array.

Resolution image0res - - The resolution the image should be.

  • Resolution image0resw -
  • Resolution image0resh -

Format image0format - - The pixel format the image should be allocated as.

  • Use Output useoutput - Use the same pilxe format that the Render TOPs main texture is set to be.
  • 8-bit fixed (RGBA) rgba8fixed -
  • sRGB 8-bit fixed (RGBA) srgba8fixed -
  • 16-bit float (RGBA) rgba16float -
  • 32-bit float (RGBA) rgba32float -
  • _separator_ _separator_ -
  • 10-bit RGB, 2-bit Alpha, fixed (RGBA) rgb10a2fixed -
  • 16-bit fixed (RGBA) rgba16fixed -
  • 11-bit float (RGB), Positive Values Only rgba11float -
  • 8-bit fixed (Mono) mono8fixed -
  • 16-bit fixed (Mono) mono16fixed -
  • 16-bit float (Mono) mono16float -
  • 32-bit float (Mono) mono32float -
  • 8-bit fixed (RG) rg8fixed -
  • 16-bit fixed (RG) rg16fixed -
  • 16-bit float (RG) rg16float -
  • 32-bit float (RG) rg32float -
  • 8-bit fixed (A) a8fixed -
  • 16-bit fixed (A) a16fixed -
  • 16-bit float (A) a16float -
  • 32-bit float (A) a32float -
  • 8-bit fixed (Mono+Alpha) monoalpha8fixed -
  • 16-bit fixed (Mono+Alpha) monoalpha16fixed -
  • 16-bit float (Mono+Alpha) monoalpha16float -
  • 32-bit float (Mono+Alpha) monoalpha32float -

Type image0type - - Specify what type of texture to create with the image output.

  • 2D Texture texture2d -
  • 2D Texture Array texture2darray -
  • 3D Texture texture3d -
  • Cube Texture texturecube -

Depth image0depth - Set the depth when output Type is 2D Texture Array or 3D Texture.

Access image0access - - Controls how the output textures will be accessed. If the textures will be read from (such as using values generated by other shader executions within the same frame), then the access should be changed to Read-Write instead of Write Only.

  • Write Only writeonly -
  • Read-Write readwrite -


Parameters - Common Page

Output Resolution outputresolution - - quickly change the resolution of the TOP's data.

  • Use Input useinput - Uses the input's resolution.
  • Eighth eighth - Multiply the input's resolution by that amount.
  • Quarter quarter - Multiply the input's resolution by that amount.
  • Half half - Multiply the input's resolution by that amount.
  • 2X 2x - Multiply the input's resolution by that amount.
  • 4X 4x - Multiply the input's resolution by that amount.
  • 8X 8x - Multiply the input's resolution by that amount.
  • Fit Resolution fit - Grow or shrink the input resolution to fit this resolution, while keeping the aspect ratio the same.
  • Limit Resolution limit - Limit the input resolution to be not larger than this resolution, while keeping the aspect ratio the same.
  • Custom Resolution custom - Directly control the width and height.

Resolution resolution - - Enabled only when the Resolution parameter is set to Custom Resolution. Some Generators like Constant and Ramp do not use inputs and only use this field to determine their size. The drop down menu on the right provides some commonly used resolutions.

  • W resolutionw -
  • H resolutionh -

Resolution Menu resmenu - A drop-down menu with some commonly used resolutions.

Use Global Res Multiplier resmult - Uses the Global Resolution Multiplier found in Edit>Preferences>TOPs. This multiplies all the TOPs resolutions by the set amount. This is handy when working on computers with different hardware specifications. If a project is designed on a desktop workstation with lots of graphics memory, a user on a laptop with only 64MB VRAM can set the Global Resolution Multiplier to a value of half or quarter so it runs at an acceptable speed. By checking this checkbox on, this TOP is affected by the global multiplier.

Output Aspect outputaspect - - Sets the image aspect ratio allowing any textures to be viewed in any size. Watch for unexpected results when compositing TOPs with different aspect ratios. (You can define images with non-square pixels using xres, yres, aspectx, aspecty where xres/yres != aspectx/aspecty.)

  • Use Input useinput - Uses the input's aspect ratio.
  • Resolution resolution - Uses the aspect of the image's defined resolution (ie 512x256 would be 2:1), whereby each pixel is square.
  • Custom Aspect custom - Lets you explicitly define a custom aspect ratio in the Aspect parameter below.

Aspect aspect - - Use when Output Aspect parameter is set to Custom Aspect.

  • Aspect1 aspect1 -
  • Aspect2 aspect2 -

Aspect Menu armenu - A drop-down menu with some commonly used aspect ratios.

Input Smoothness inputfiltertype - - This controls pixel filtering on the input image of the TOP.

  • Nearest Pixel nearest - Uses nearest pixel or accurate image representation. Images will look jaggy when viewing at any zoom level other than Native Resolution.
  • Interpolate Pixels linear - Uses linear filtering between pixels. This is how you get TOP images in viewers to look good at various zoom levels, especially useful when using any Fill Viewer setting other than Native Resolution.
  • Mipmap Pixels mipmap - Uses mipmap filtering when scaling images. This can be used to reduce artifacts and sparkling in moving/scaling images that have lots of detail.

Fill Viewer fillmode - - Determine how the TOP image is displayed in the viewer.

NOTE:To get an understanding of how TOPs work with images, you will want to set this to Native Resolution as you lay down TOPs when starting out. This will let you see what is actually happening without any automatic viewer resizing.

  • Use Input useinput - Uses the same Fill Viewer settings as it's input.
  • Fill fill - Stretches the image to fit the edges of the viewer.
  • Fit Horizontal width - Stretches image to fit viewer horizontally.
  • Fit Vertical height - Stretches image to fit viewer vertically.
  • Fit Best best - Stretches or squashes image so no part of image is cropped.
  • Fit Outside outside - Stretches or squashes image so image fills viewer while constraining it's proportions. This often leads to part of image getting cropped by viewer.
  • Native Resolution nativeres - Displays the native resolution of the image in the viewer.

Viewer Smoothness filtertype - - This controls pixel filtering in the viewers.

  • Nearest Pixel nearest - Uses nearest pixel or accurate image representation. Images will look jaggy when viewing at any zoom level other than Native Resolution.
  • Interpolate Pixels linear - Uses linear filtering between pixels. Use this to get TOP images in viewers to look good at various zoom levels, especially useful when using any Fill Viewer setting other than Native Resolution.
  • Mipmap Pixels mipmap - Uses mipmap filtering when scaling images. This can be used to reduce artifacts and sparkling in moving/scaling images that have lots of detail. When the input is 32-bit float format, only nearest filtering will be used (regardless of what is selected).

Passes npasses - Duplicates the operation of the TOP the specified number of times. For every pass after the first it takes the result of the previous pass and replaces the node's first input with the result of the previous pass. One exception to this is the GLSL TOP when using compute shaders, where the input will continue to be the connected TOP's image.

Channel Mask chanmask - Allows you to choose which channels (R, G, B, or A) the TOP will operate on. All channels are selected by default.

Pixel Format format - - Format used to store data for each channel in the image (ie. R, G, B, and A). Refer to Pixel Formats for more information.

  • Use Input useinput - Uses the input's pixel format.
  • 8-bit fixed (RGBA) rgba8fixed - Uses 8-bit integer values for each channel.
  • sRGB 8-bit fixed (RGBA) srgba8fixed - Uses 8-bit integer values for each channel and stores color in sRGB colorspace. Note that this does not apply an sRGB curve to the pixel values, it only stores them using an sRGB curve. This means more data is used for the darker values and less for the brighter values. When the values are read downstream they will be converted back to linear. For more information refer to sRGB.
  • 16-bit float (RGBA) rgba16float - Uses 16-bits per color channel, 64-bits per pixel.
  • 32-bit float (RGBA) rgba32float - Uses 32-bits per color channel, 128-bits per pixels.
  • 10-bit RGB, 2-bit Alpha, fixed (RGBA) rgb10a2fixed - Uses 10-bits per color channel and 2-bits for alpha, 32-bits total per pixel.
  • 16-bit fixed (RGBA) rgba16fixed - Uses 16-bits per color channel, 64-bits total per pixel.
  • 11-bit float (RGB), Positive Values Only rgba11float - A RGB floating point format that has 11 bits for the Red and Green channels, and 10-bits for the Blue Channel, 32-bits total per pixel (therefore the same memory usage as 8-bit RGBA). The Alpha channel in this format will always be 1. Values can go above one, but can't be negative. ie. the range is [0, infinite).
  • 16-bit float (RGB) rgb16float -
  • 32-bit float (RGB) rgb32float -
  • 8-bit fixed (Mono) mono8fixed - Single channel, where RGB will all have the same value, and Alpha will be 1.0. 8-bits per pixel.
  • 16-bit fixed (Mono) mono16fixed - Single channel, where RGB will all have the same value, and Alpha will be 1.0. 16-bits per pixel.
  • 16-bit float (Mono) mono16float - Single channel, where RGB will all have the same value, and Alpha will be 1.0. 16-bits per pixel.
  • 32-bit float (Mono) mono32float - Single channel, where RGB will all have the same value, and Alpha will be 1.0. 32-bits per pixel.
  • 8-bit fixed (RG) rg8fixed - A 2 channel format, R and G have values, while B is 0 always and Alpha is 1.0. 8-bits per channel, 16-bits total per pixel.
  • 16-bit fixed (RG) rg16fixed - A 2 channel format, R and G have values, while B is 0 always and Alpha is 1.0. 16-bits per channel, 32-bits total per pixel.
  • 16-bit float (RG) rg16float - A 2 channel format, R and G have values, while B is 0 always and Alpha is 1.0. 16-bits per channel, 32-bits total per pixel.
  • 32-bit float (RG) rg32float - A 2 channel format, R and G have values, while B is 0 always and Alpha is 1.0. 32-bits per channel, 64-bits total per pixel.
  • 8-bit fixed (A) a8fixed - An Alpha only format that has 8-bits per channel, 8-bits per pixel.
  • 16-bit fixed (A) a16fixed - An Alpha only format that has 16-bits per channel, 16-bits per pixel.
  • 16-bit float (A) a16float - An Alpha only format that has 16-bits per channel, 16-bits per pixel.
  • 32-bit float (A) a32float - An Alpha only format that has 32-bits per channel, 32-bits per pixel.
  • 8-bit fixed (Mono+Alpha) monoalpha8fixed - A 2 channel format, one value for RGB and one value for Alpha. 8-bits per channel, 16-bits per pixel.
  • 16-bit fixed (Mono+Alpha) monoalpha16fixed - A 2 channel format, one value for RGB and one value for Alpha. 16-bits per channel, 32-bits per pixel.
  • 16-bit float (Mono+Alpha) monoalpha16float - A 2 channel format, one value for RGB and one value for Alpha. 16-bits per channel, 32-bits per pixel.
  • 32-bit float (Mono+Alpha) monoalpha32float - A 2 channel format, one value for RGB and one value for Alpha. 32-bits per channel, 64-bits per pixel.


Parameters - GLSL 1 Page

Type imagetype - - Specify what type of texture to create with the image output.

  • 2D Texture texture2d - Creates a 2D texture.
  • 2D Texture Array texture2darray - Creates a 2D Texture Array. Slices of the array can be access using a non-normalized integer index for the w coordinate.
  • 3D Texture texture3d - Creates a 3D Texture. Slices of the array can be accessed using the w coordinate in the range 0-1. Value of the texture in between slices are interpolated.
  • Cube Texture texturecube - Creates a cubemap texture.

Depth imagedepth - Set the depth when output Type is 2D Texture Array or 3D Texture.

Access imageaccess - - Controls how the output textures will be accessed. If the textures will be read from (such as using values generated by other shader executions within the same frame), then the access should be changed to Read-Write instead of Write Only.

  • Write Only writeonly -
  • Read-Write readwrite -

Sampler Name 0 sampler0 - This is the sampler name that the GLSL program will use to sample from this TOP. The samplers need to be declared as the same dimensions as the TOP (sampler2D for a 2D TOP, sampler3D for 3D TOP).

TOP top0 - - This is the TOP that will be referenced by the above sampler name above it.

Extend U top0extendu - -
  • Hold hold -
  • Zero zero -
  • Repeat repeat -
  • Mirror mirror -
Extend V top0extendv - -
  • Hold hold -
  • Zero zero -
  • Repeat repeat -
  • Mirror mirror -
Extend W top0extendw - -
  • Hold hold -
  • Zero zero -
  • Repeat repeat -
  • Mirror mirror -
Filter top0filter - -
  • Nearest nearest -
  • Linear linear -
  • Mipmap Linear mipmaplinear -
Anisotropic Filter top0anisotropy - -
  • Off off -
  • 2x 2x -
  • 4x 4x -
  • 8x 8x -
  • 16x 16x -

Image Output imageoutput - Image Output allows you to read/write arbitrary data to a image2D, image3D etc, GLSL uniform using imageStore() and imageLoad() GLSL. This allows for extra data to be stored/loaded during the render process, to be used later. The uniforms will be named one of these arrays, depending on the type of image output selected mTD2DImageOutputs[], mTD2DArrayImageOutputs[], mTD3DImageOutputs[], mTDCubeImageOutputs[]. Since only one image ouptut is currently supported, index [0] should always be used to access these. The buffer is cleared to 0 before every render.

Resolution imageres - - The resolution of the image output. This does not need to be the same as the resolution the main Render is doing.

  • Resolution imageresw -
  • Resolution imageresh -

Parameters - GLSL 2 Page

Uniform Name 0 uniname0 - The uniform name, as declared in the shader.

Value value0 - - The value to assign to the uniform. If the uniform is a float the first entry of the four is used, if the uniform is a vec2 the first two entries are used, etc.

  • Value value0x -
  • Value value0y -
  • Value value0z -
  • Value value0w -


Info CHOP Channels

Extra Information for the Render TOP can be accessed via an Info CHOP.

Common TOP Info Channels

  • resx - Horizontal resolution of the TOP in pixels.
  • resy - Vertical resolution of the TOP in pixels.
  • aspectx - Horizontal aspect of the TOP.
  • aspecty - Vertical aspect of the TOP.
  • depth - Depth of 2D or 3D array if this TOP contains a 2D or 3D texture array.
  • gpu_memory_used - Total amount of texture memory used by this TOP.

Common Operator Info Channels

  • total_cooks - Number of times the operator has cooked since the process started.
  • cook_time - Duration of the last cook in milliseconds.
  • cook_frame - Frame number when this operator was last cooked relative to the component timeline.
  • cook_abs_frame - Frame number when this operator was last cooked relative to the absolute time.
  • cook_start_time - Time in milliseconds at which the operator started cooking in the frame it was cooked.
  • cook_end_time - Time in milliseconds at which the operator finished cooking in the frame it was cooked.
  • cooked_this_frame - 1 if operator was cooked this frame.
  • warnings - Number of warnings in this operator if any.
  • errors - Number of errors in this operator if any.


TouchDesigner Build:

TOPs
Add • Analyze • Anti Alias • Blob Track • Bloom • Blur • Cache Select • Cache • Channel Mix • CHOP to • Chroma Key • Circle • Composite • Constant • Convolve • Corner Pin • CPlusPlus • Crop • Cross • Cube Map • Depth • Difference • DirectX In • DirectX Out • Displace • Edge • Emboss • Feedback • Fit • Flip • Function • GLSL Multi • GLSL • HSV Adjust • HSV to RGB • Import Select • In • Inside • Introduction To s Vid • Kinect Azure Select • Kinect Azure • Kinect • Layout • Leap Motion • Lens Distort • Level • Limit • Lookup • Luma Blur • Luma Level • Math • Matte • Mirror • Monochrome • MoSys • Movie File In • Movie File Out • MPCDI • Multiply • Ncam • NDI In • NDI Out • Noise • Normal Map • Notch • Null • Nvidia Background • Nvidia Denoise • Nvidia Flex • Nvidia Flow • Nvidia Upscaler • OAK Select • Oculus Rift • OP Viewer • OpenColorIO • OpenVR • Optical Flow • Orbbec Select • Orbbec • Ouster Select • Ouster • Out • Outside • Over • Pack • Photoshop In • Point File In • Point File Select • Point Transform • PreFilter Map • Projection • Ramp • RealSense • Rectangle • Remap • Render Pass • Render Select • Render • RenderStream In • RenderStream Out • Reorder • Resolution • RGB Key • RGB to HSV • Scalable Display • Screen Grab • Screen • Script • Select • Shared Mem In • Shared Mem Out • SICK • Slope • Spectrum • SSAO • Stype • Substance Select • Substance • Subtract • SVG • Switch • Syphon Spout In • Syphon Spout Out • Text • Texture 3D • Texture Sampling Parameters • Threshold • Tile • Time Machine • TOP • TOP Viewer • Touch In • Touch Out • Transform • Under • Video Device In • Video Device Out • Video Stream In • Video Stream Out • Vioso • Web Render • ZED