You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ShaderLab ships with 33 built-in ShaderLab effects implemented in Effects/ShaderLabEffects.h/.cpp, on top of the 40+ wrapped built-in D2D effects in Effects/EffectRegistry.cpp. Each ShaderLab effect has its HLSL embedded as a string constant, compiled at first use via ShaderCompiler (and cached on disk under %LOCALAPPDATA%\ShaderLab\bytecode\ so subsequent sessions reuse the bytecode), and shares a common color math library (BT.709 / BT.2020 / DCI-P3 matrices, PQ / HLG transfer functions, CIE xy conversions, ICtCp). Every effect is versioned with effectId and effectVersion so saved graphs can be upgraded in place — see Effect Versioning System.
HDR ↔ SDR operators built around BT.2100 ICtCp. The key property: I (intensity) is decoupled from Ct/Cp (chromaticity), so compressing or expanding I alone preserves hue and saturation by construction. This is the design thesis of the suite: operations that need to be carefully done in linear RGB or CIE xyY (per-channel hue shifts, gamut excursions, chromaticity drift) reduce to one-line manipulations of I in ICtCp. Each operator exposes its nit-targets as numeric parameters — wire them from working_space.SdrWhiteNits / PeakNits to track the OS slider or simulated profile automatically.
Effect
Type
Description
ICtCp Round-Trip Validator
PS
Diagnostic: outputs |scRGB→ICtCp→scRGB - in| × Gain. Should render black on a correct image; non-zero output indicates a bug in the ICtCp conversion.
ICtCp Tone Map (HDR → SDR)
CS-Img
I-channel Reinhard compression with ToneLift polynomial bump. Source / target peaks specified in nits; Ct/Cp pass through unchanged.
ICtCp Inverse Tone Map (SDR → HDR)
CS-Img
Mirror of the above; inverse Reinhard expands SDR-anchored content into the HDR peak.
ICtCp Saturation
PS
Per-pixel saturation gain in ICtCp (scales Ct/Cp around the I-axis).
ICtCp Highlight Desaturation
CS-Img
Smoothly reduces saturation above a configurable I threshold (counteracts tone-map hue shifts at clipping).
Analysis → Gamut
Effect
Type
Description
Gamut Coverage
CS-Img
Percentage of target gamut volume covered by input (image overlay + analysis field).
ICtCp Boundary
PS
ICtCp gamut boundary visualization for a chosen target gamut.
Color Processing
Effect
Type
Description
Gamut Map
PS
CIE xy gamut mapping: Clip / Nearest / Compress to White / Fit Gamut.
ICtCp Gamut Map
PS
Perceptual gamut mapping in BT.2100 ICtCp space: Nearest on Shell / Compress to Neutral / Fit to Shell. (Renamed from Perceptual Gamut Map in v1.3.8 — old graphs load via legacy alias.)
Scale
CS-Img
Resample the input to a target width × height with selectable filter (point / bilinear / box). Used to throttle preview resolution for heavy chains without losing analysis-branch fidelity.
Source / Generator
Effect
Type
Description
Gamut Source
PS
Swept gamut fill for a target color space.
Color Checker
PS
Macbeth ColorChecker pattern with accurate sRGB patches.
Zone Plate
PS
Sine-wave zone plate for resolution / aliasing testing.
Gradient Generator
PS
Configurable linear / radial gradient with HDR range.
Decodes a video file frame-by-frame; advances under the animation timeline / Clock node.
DXGI Desktop Duplication
Host (DXGI)
Live capture of an entire monitor via IDXGIOutputDuplication. Submenu lists each adapter / output. Outputs raw FP16 scRGB so SDR monitors land at scRGB 1.0 ≈ 80 nits and HDR monitors preserve their full range.
Windows Graphics Capture
Host (Windows.Graphics.Capture)
Live capture of an arbitrary window or monitor via the standard WinUI graphics-capture picker. Same FP16 scRGB output convention as DXGI duplication.
Composition
Effect
Type
Description
Split Comparison
PS
Two-input wipe comparator with adjustable split & divider.
Data / Parameter Nodes
Node
Description
Float Parameter
Continuous slider; teal node with inline canvas slider.
Time source: outputs Time (seconds) and Progress (0–1 over a configurable duration). Drives the animation system.
Numeric Expression
Single configurable math node powered by ExprTk; user-supplied formula evaluated against dynamic float inputs A..Z. Replaces the older Add / Subtract / Multiply / Divide / Min / Max nodes. See Numeric Expression Node.
Random
Takes a single Seed float input and outputs a deterministic, well-mixed Result in [0, 1). The output is a pure function of the seed (SplitMix64-style integer mixer on the float's bit pattern), so identical seeds always reproduce identical values and any change — e.g. a tick from an upstream Clock or Numeric Expression — yields a fresh random number.
Working Space
Strict sink (no input pins, no output image pin) that mirrors the active display profile from the top-bar profile selector — live OS-reported caps or whatever simulated preset / ICC the user has applied. Exposes 14 typed analysis output fields: ActiveColorMode (0=SDR, 1=WCG/ACM, 2=HDR), HdrSupported, HdrUserEnabled, WcgSupported, WcgUserEnabled, IsSimulated, SdrWhiteNits, PeakNits, MinNits, MaxFullFrameNits, plus the four CIE-xy primaries RedPrimary / GreenPrimary / BluePrimary / WhitePoint (each Float2). Bind any downstream property to these fields via the property-binding system to drive an effect from the live working space — e.g. wire a tone-mapper's peak-nits to working_space.PeakNits and it will track Display Settings or simulated profile changes automatically without touching the graph.