home | download | howto | module docs | git

module reference documentation

image processing is done in a DAG with potentially multiple sources and multiple sinks. the graph does in fact not strictly have to be acyclic, we allow feedback connectors for iterative/multi-frame execution.

list of modules

it follows the reference documentation of available modules, grouped into categories.



visualisation and inspection

raw processing

colour processing






3d rendering

internal use

default pipeline

by default, a raw image is passed through the following pipeline:

you can change the default pipeline by hacking default-darkroom.i-raw (either in the vkdt basedir or the homedir) for darkroom mode and default.i-raw for thumbnails. the i-raw suffix indicates that the file will be used for raw input, there is also the equivalent i-mlv version for raw video.

files to describe a module

note that most strings here (parameter and connector names etc) are stored as dt_token_t, which is exactly 8 bytes long. this means we can very easily express the parameters and corresponding history stacks in a binary format, which is useful for larger parameter sets such as used for the vertices in the draw module.


is used to express compile time dependencies (if you're including glsl files or if you have a main.c to be compiled). this is build-time only and not needed to run vkdt.


defines the io connectors, for instance


defines one connector called input and one called output in rgba with f16 format.

the specifics of a connector are name, type, channels, and format. name is an arbitrary identifier for your perusal. note however that input and output trigger special conventions for default callbacks wrt region of interest or propagation of image parameters (module->img_param).

the type is one of read write source sink. sources and sinks do not have compute shaders associated with them, but will call read_source and write_sink callbacks you can define in a custom main.c piece of code.

the channels can be anything you want, but the GPU only supports one, two, or four channels per pixel. these are represented by one char each, and will be matched during connection of modules.

format can be one of the primitive ui8 ui16 ui32 f16 f32 or one of the special formats dspy and atom. dspy evaluates to the display capabilities (may be a 10 bits/channel special format). atom evaluates to f32 if supported, or else falls back to ui32 (many amd cards).

when connecting two modules, the connectors will be tested for compatibility. some modules can handle more than one specific configuration of channels and formats, so they specify a wildcard * instead. if both reader and writer specify * vkdt defaults to rgba:f16.

there is one more special case, modules can reference the channel or format of a previously connected connector on the same module, for instance the blend module:


references the channel configuration of the input connector and configures the output connector to match it. note that this requires to connect input before output.


defines the parameters that can be set in the cfg files and which will be routed to the compute shaders as uniforms. for instance



defines the mapping of parameters to ui widgets. i recommend you look through existing examples to get a sense. the ui is programmed in c++, the modules in c, and the processing is done in glsl. this way there is an extremely clear separation of algorithms, module logic, and gui.

the format is in general, one per line:

<name of parameter>:<widget>:<special info for widget>

the ui supports the following widgets

the group keyword is used to only show the following ui elements if a parameter switch is set accordingly. syntax: group:<param>:<val>. for an example, see the colour module. here, <param> refers to an int parameter driven by a combo box, and we use it to only show the colour temperature slider if the matrix mode is set to colour lookup table clut:


everything after the group directive until the next one will be shown only if the matrix parameter is set to 4.

April 2024