User Manual

Table Of Contents
About DCTL
DCTL files are actually color transformation scripts that DaVinci Resolve sees and applies just
like any other LUT. Unlike other LUTs, which are 1D or 3D lookup tables of values that
approximate image transformations using interpolation, DCTL files are actually comprised of
computer code that directly transforms images using combinations of math functions that you
devise. Additionally, DCTL files run natively on the GPU of your workstation, so they can be fast.
Anyone with the mathematical know-how can make and install a DCTL. Simply enter your
transformation code, using a syntax that’s similar to C (described in more detail below), into any
text editor capable of saving a plain ASCII text file, and make sure its name ends with the “.dctl
(DaVinci Color Transform Language) file extension. Once that’s done, move the file to the LUT
directory of your workstation. Where that is depends on which OS you’re using:
On Mac OS X: Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/
On Windows: C:\ProgramData\Blackmagic Design\DaVinci Resolve\Support\LUT
On Linux: /home/resolve/LUT
When DaVinci Resolve starts up, assuming the syntax of your .dctl is correct, they appear in the
Color page Node contextual menu within the DaVinci CTL submenu.
DCTL Syntax
Users need to put __DEVICE__ in front of each function they write. For example:
__DEVICE__ float2 DoSomething()
The main entry function (transform) should come after all other functions, with the following
format argument:
__DEVICE__ float3 transform(float p_R, float p_G, float p_B)
The main entry function must also have a float3 return value.
For the following floating point math functions, please use the described syntax:
float _fabs(float) // Absolute Value
float _powf(float x, float y // Compute x to the power of y
float _logf(float) // Natural logarithm
float _log2f(float) // Base 2 logarithm
float _log10f(float) // Base 10 logarithm
float _exp2f(float) // Exponential base 2
float _expf(float) // Exponential base E
float _copysignf(float x, float y) // Return x with sign changed to sign y
float _fmaxf(float x, float y) // Return y if x < y
float _fminf(float x, float y) // Return y if x > y
float _saturatef(float x, float minVal,
float maxVal)
// Return min(max(x, minVal), maxVal)
Chapter – 174 Creating DCTL LUTs 3535