Description

This node enables you to import any Shader file respecting the ISF 2.0 format.

ISF stands for Interactive Shader Format and is a file format built on top of GLSL (OpenGL Shader Language) to create cross-platform and file-independent video generators or FX plugins that can be inter-connected using inputs and outputs.

When creating this node in your graph, a pop-up menu will open pointing to your Render Graphs folder in the FxGraph folder of your show. This is where the .fs shader format file must be stored for it to be accessed by the node. If opening your .fs file does not result in the creation of a node running your shade, please make sure your shader code is properly formatted using ISF nomenclature. Guidelines and a cheatsheet can be found below.

When the node is created, it will automatically add the input and output pins corresponding to the elements in the JSON blob at the top of your ISF file.


Properties

These will depend on the shader you choose to import.


Inputs

Name Type Description
Image Image Image input to use for the effect

Inputs will be added automatically depending on which shader you choose to import.

Outputs

Name Type Description
Image Image Image output of the effect

Ressources

You can learn all about ISF on the official ISF website.

Converting Shaders into ISF format

The easiest way to convert your shaders into ISF format is to use the ISF Editor and use it’s built-in function to automatically import Shaders either from Shadertoy or GLSL Sandbox.

You can find more details on the procedure on the ISF Documentation.

Cheatsheet

Here is a collection of the common replacements to make to GLSL code to have it respect ISF format :

GLSL format ISF format Comment
u_time, i_time, etc. TIME Global time variable
texture2D() IMG_NORM_PIXEL() Normalized pixel coordinates of the image buffer
texture2DRect() IMG_PIXEL() Non-Normalized pixel coordinates of the image buffer
- RENDERSIZE Dimensions of image being rendered
- gl_FragCoord.xy Coordinates of fragment being evaluated
- isf_FragNormCoord.xy Normalized coordinates of fragment being evaluated
  • Custom uniform variable declarations must be replaced by elements in the INPUTS section of the JSON blob.
  • Add gl_FragColor.a = 1.0; at the end of the shader to acknowledge the alpha channel.

Render Graph specific modifications

Types to use in your JSON

Type Description
float Float point value
image Standard image
point2D 2D Vector
bool Boolean
color Color value (RGB)

Disable node function

Add the following snippet at the beginning of your main() function :

if (DISABLE_BLOCK) {
        gl_FragColor = vec4(0.0f);
        return;
    }

Mask mode support

Add the following line at the end of your main() function :

gl_FragColor.a = IMG_THIS_MASK();

Need more help with this?
Don’t hesitate to contact us here.

Thanks for your feedback.