StencilWorks – High-Fidelity Post-Processing for Depth & Stencil Buffers in UE5
Eliminate jitter, upscale quality, and unlock powerful new effects from your depth and stencil data.
StencilWorks is a specialized Unreal Engine 5 plugin designed to stabilize and enhance SceneDepth, CustomDepth, and CustomStencil buffers when used in post-processing after TSR (Temporal Super Resolution). Without correction, these buffers suffer from low-resolution artifacts, temporal instability, and flickering — degrading the quality of outlines, depth-based fog, masking effects, and more. StencilWorks solves this with intelligent temporal accumulation, reprojection, and adaptive upscaling tailored for high-performance post effects.
In addition to stabilization, StencilWorks introduces a novel Closest Stencil Distance Field Generator. This system provides per-pixel access to:
The closest point on the stencil mask (for each of the 8 stencil bits),
The signed distance to the nearest edge (positive outside, negative inside),
And the directional vector pointing toward the closest edge.
These powerful tools enable a range of new visual effects:
Soft outlines that adapt to camera movement and resolution,
Distance-based glows or fades around masked objects,
Fluid-aware edge detection and interaction zones,
Or any effect that benefits from smooth, screen-space spatial awareness of stencil-defined objects.
Whether you're building stylized visuals, gameplay-driven post effects, or cinematic-quality rendering tools, StencilWorks provides the temporal and spatial fidelity necessary for modern pipelines in Unreal Engine 5.