Code_for_developing_Lightworks_effects

Here we collect code to create Lightworks.fx effects.

View project on GitHub

PROJECTfps

Calculation of the project frame rate

This macro PROJECTfps calculates the actual frame rate of the project. This may differ from the automatically synchronized variable float _OutputFPS, which passes the framerate set in the project settings “Video / Output / Format”.
Global for the entire effect (add outside and above all shaders and functions):

//--------------------------------------------------------------//
// Definitions, declarations und macros
//--------------------------------------------------------------//

float _Length;
float _LengthFrames; 

#define PROJECTfps   (_LengthFrames / _Length)