How lofi-fx/spectra works
Spectra is an OFX film-emulation and finishing plugin for DaVinci Resolve. The workflow is: an editor supplies footage and effect settings in the host; the plugin applies film response and finishing controls through GPU rendering; the processed image returns to the host. The README also describes grain, halation, split toning, optical diffusion, printer points, and colour-space transforms. The excerpts establish the shared parameter and data structures, LUT and preset parsing, and GPU interfaces; some rendering-call details are not shown, so those links are omitted or marked unverified.
Main entry points: LowFiFxPlugin.cpp OFX Effect · MetalKernels.h Metal Renderer · CudaKernels.h CUDA Interface · LutPack.h Packed LUT Reader
Components 16
OFX Plugin
- OFX Effect
src/LowFiFxPlugin.cpp - Effect Controls
src/LowFiFxPlugin.cpp - Finishing Effects
src/LowFiFxPlugin.cpp
Film Data
- Film Data Loader
src/SpectralFilmData.h - Film Stock Assets
Resources/spectral_film_data
Looks And Presets
- Packed LUT Reader
src/LutPack.h - Cube LUT Parser
src/CubeParser.h - Colour LUT Assets
LUTs - Preset Reader
src/PresetParser.cpp
GPU Rendering
- Render Parameters
src/GrainParams.h - Metal Renderer
src/MetalKernels.h - Metal Kernel Source
src/MetalKernelSource.h - CUDA Interface
src/CudaKernels.h - CUDA Stubs
src/CudaKernels.cpp
Other components
- Editor
- DaVinci Resolve
Connections 18
- Editor → DaVinci Resolve: edits footage
README.md - DaVinci Resolve → OFX Effect: hosts effect
README.md - OFX Effect → Effect Controls: defines controls
src/LowFiFxPlugin.cpp - OFX Effect → Render Parameters: builds parameters
src/LowFiFxPlugin.cpp - OFX Effect → Finishing Effects: applies effects
src/LowFiFxPlugin.cpp - OFX Effect → Film Data Loader: references data
src/LowFiFxPlugin.cpp - Film Data Loader → Film Stock Assets: loads records
- OFX Effect → Packed LUT Reader: references LUT reader
src/LowFiFxPlugin.cpp - Packed LUT Reader → Cube LUT Parser: converts LUTs
src/LutPack.h - OFX Effect → Preset Reader: references presets
src/LowFiFxPlugin.cpp - OFX Effect → Metal Renderer: dispatches rendering
src/LowFiFxPlugin.cpp - OFX Effect → CUDA Interface: selects backend
src/LowFiFxPlugin.cpp - CUDA Interface → CUDA Stubs: implemented by
src/CudaKernels.cpp - Metal Renderer → Render Parameters: consumes parameters
src/MetalKernels.h - CUDA Interface → Render Parameters: consumes parameters
src/CudaKernels.h - Metal Renderer → Metal Kernel Source: uses kernels
- OFX Effect → DaVinci Resolve: returns processed image
- Colour LUT Assets → Packed LUT Reader: packed at build time