Skip to content

linux: OBS video filter (3D LUT, grade, sharpen, FXAA) - #96

Merged
Likely7 merged 1 commit into
Likely7:mainfrom
andreanjos:linux-port
Nov 18, 2026
Merged

Likely7 merged 1 commit into
Likely7:mainfrom
andreanjos:linux-port

Conversation

@andreanjos

@andreanjos andreanjos commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Linux counterpart of the enhancement chain, as an OBS video filter. OBS already owns capture, decode, composition and encode, so this adds only the per-frame GPU work that is portable — no D3D12/COM/Win32 port needed.

Filter id veyra_filter, shown as Veyra Enhancement. Add it to any source (video capture device, window/screen capture, media source).

source frame -> 3D LUT -> colour grade -> FXAA -> sharpen -> output
Control Range Notes
3D LUT (.cube) file LUT_3D_SIZE 2…64, DOMAIN_MIN/MAX, red-fastest ordering, volume texture + linear sampling
LUT strength 0…100 % blend against the ungraded colour
Exposure −2…2 EV
Contrast 0.5…2 pivot 0.5
Saturation 0…2 Rec.601 luma
FXAA on/off luma-directional, on the graded picture
Sharpen 0…1 5-tap unsharp cross after AA

Verified

Recorded 1080p30 through OBS 32.2.2 (RTX 3090, EGL/Wayland) with synthetic sources and sampled the mkv:

Filter state Recorded Expected
filter not loaded 251, 0, 0 passthrough
identity 33³ LUT 254, 0, 0 passthrough ±NV12 quantisation
invert 33³ LUT 0, 253, 254 red → cyan
saturation 0 75, 75, 75 0.299 × 251
exposure −1 EV 124, 0, 0 251 × 0.5
sharpen 1.0, 1 px stripes 96/166 61 / 201 overshoot away from the mean
FXAA on, diagonal edge 171 (was 214) edge blended toward the dark side

Not ported, by API not by effort

NGX (DLSS SR/FG, RTX Video SR/HDR, DeepDVC, optical flow) and the neural NR adapter (src/ngx/DlssNrRuntimeAdapter.cpp) have no public Linux SDK. Capture, recording, subtitles, presets and the node graph stay with OBS. SMAA/MLAA and FSR/XeSS are portable in principle but not implemented here.

Build/install and the full mapping: docs/OBS_FILTER.md. sudo cmake --install build puts the module in /usr/lib/obs-plugins/veyra-filter.so.

OBS owns capture, decode, composition and encode, so the Linux contribution is
the portable per-frame enhancement chain as an OBS video filter
(`veyra_filter`, shown as "Veyra Enhancement"). The Windows tree is untouched:
the root CMakeLists takes the WIN32 branch and only adds `linux/obs` elsewhere.

Chain: source -> 3D LUT -> colour grade -> FXAA -> sharpen -> output.
  * 3D LUT: .cube parser (LUT_3D_SIZE 2..64, DOMAIN_MIN/MAX, red-fastest
    ordering), uploaded as a volume texture with linear sampling; strength
    0..100% blends against the ungraded colour.
  * Grade: exposure -2..2 EV, contrast 0.5..2, saturation 0..2 (Rec.601 luma).
  * FXAA: luma-directional, 5-tap cross + 2 diagonal taps, run on the graded
    picture.
  * Sharpen: 5-tap unsharp cross after AA so sharpened edges are not softened
    back by the AA stage.
Effect compiled at create time inside obs_enter_graphics(); every stage is
driven by uniform parameters, so no pipeline is rebuilt at runtime.

Verified by recording 1080p30 through OBS 32.2.2 (RTX 3090, EGL/Wayland) with
synthetic sources and sampling the mkv: identity LUT passthrough (254,0,0),
invert LUT red->cyan (0,253,254), saturation 0 (75,75,75 = Rec.601 luma),
exposure -1EV (124,0,0), sharpen 1.0 on 1px stripes (96/166 -> 61/201), FXAA on
a diagonal edge (214 -> 171). Details in docs/OBS_FILTER.md.

Deliberately absent: NGX (DLSS SR/FG, RTX Video SR/HDR, DeepDVC, optical flow)
and the neural NR adapter have no public Linux SDK; capture/record/subtitles and
the node graph stay with OBS.
@andreanjos andreanjos changed the title linux: standalone Linux port (FFmpeg + Vulkan/QRhi) and OBS video filter linux: OBS video filter (3D LUT, grade, sharpen, FXAA) Nov 12, 2026
@Likely7
Likely7 marked this pull request as ready for review November 18, 2026 10:44
@Likely7
Likely7 merged commit 0c40b02 into Likely7:main Nov 18, 2026
Likely7 added a commit that referenced this pull request Nov 18, 2026
…ixes

Integrates #140, #133, #127, #115, #99, #96 and #75 with their original heads; adopts #136 as source only to exclude DLL/LIB history. Preserves current virtual-camera, audio, replay and default settings. Windows product, 634 preset checks, 220 QtQuick cases, 256 RPU checks and Linux/Windows CI validated. See docs/PR_INTEGRATION_2026-11-18.md for evidence and untested hardware scope.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants