Developer Documentation
Build custom shaders, native DLLs, and effects for Forge Cut.
1. GLSL Custom Shaders
Forge Cut supports rendering real-time effects and audio visualizers via pure GLSL fragment shaders. The C++ engine evaluates these using WebGL/Legacy GLSL syntax (texture2D()).
Built-in Uniforms
The engine automatically injects the following variables into your shader. You do not need to declare these in your code:
uniform sampler2D texRGB; // Main video frame
uniform sampler2D texA; // Transition Source A
uniform sampler2D texB; // Transition Source B
uniform vec2 texRes; // Current render resolution
uniform vec2 iResolution; // Alias for texRes
uniform float iTime; // Absolute timeline time
uniform vec3 iAudio; // Audio reactivity (x: Low, y: Mid, z: High)
uniform float opacity; // Base clip opacity
varying vec2 vTexCoord; // Standard UVs (0.0 to 1.0)
varying vec2 vFragCoord; // Pixel coordinatesAuto-Generating UI Parameters
You can automatically generate sliders in the Forge Cut Effect Controls panel by adding specific comments to your .frag file.
While the comment generates the UI slider, Forge Cut does not inject the variable into your GLSL. You must explicitly write uniform float yourVariable; in your code, otherwise the compiler will crash and render a blank screen.
// Syntax: @param float [name] [min] [max] [default]
// @param float blurAmount 0.0 5.0 1.0
// @param float redTint 0.0 1.0 0.5
// You MUST declare these below the comments:
uniform float blurAmount;
uniform float redTint;
void main() {
// Your code here...
}Handling the Alpha Channel
To ensure your shader blends correctly over background layers, you must preserve the original video's alpha channel multiplied by the track opacity:
vec4 bgCol = texture2D(texRGB, vTexCoord);
vec3 myEffectColor = vec3(1.0, 0.0, 0.0);
// Correct Alpha output for Forge Cut
float finalAlpha = bgCol.a * opacity;
gl_FragColor = vec4(myEffectColor, finalAlpha);2. Native C++ Video Plugins (.dll / .so)
For ultimate performance (complex homography, physics simulations), build a native DLL. Include FastNLE_VideoPlugin.h and export the following C-functions:
extern "C" {
const char* GetPluginName();
int GetParameterCount();
void GetParameterInfo(int index, FastNLE_ParamInfo* outInfo);
// Processes a raw RGBA 8-bit image buffer in-place
void ProcessVideoFrame(uint8_t* rgbaBuffer, int width, int height, float time, const float* paramValues);
void ReleasePlugin();
}3. VST3 Audio Support
Forge Cut acts as a full VST3 host. We handle interleaving, planar conversion, and UI window attachment natively. Just drop your .vst3 file onto the timeline and the Effect Controls panel will attach a gear icon to open the manufacturer's GUI. Check the ⏱ Automate box to map VST parameters directly to the Forge Cut keyframe timeline.
4. OpenFX (OFX) Support
Forge Cut acts as an OpenFX Host. We currently support kOfxImageEffectContextFilter and kOfxImageEffectContextGeneral. Drop your .ofx bundle into the timeline, and the Effect Controls panel will automatically expose all supported parameters.