Basic Setup

Setup of StencilWorks is incredibly simple!

  1. Simply open the project settings and find the StencilWorks Category. Stencil Works Settings Stencil Works Settings

  2. Configure the settings for each buffer you want upscaled.

    1. Enabled: Turn on/off upscaling of the buffer
    2. Max Size: controls the maximum size the buffer is able to upscale to, and is the backing texture size.
    3. Upscale Factor: controls the percentage of the SecondaryView size you want to upscale too. 1.0 matches TSRs output size up to the max size.
    4. Ignore Hidden by Depth: Is CustomStencil only, but it controls whether other objects in scene depth block the stencil bits so it only looks at what’s visible.
  3. Use the Upscaled Sample Nodes to sample SceneDepth/CustomDepth/CustomStencil as direct replacements to engine provided nodes. For Custom Stencil you can use the Distance,ClosestPoint, or Direction sample nodes all of which can be seen below. Stencil Works Nodes Stencil Works Nodes

  4. There are basic examples of the usage of the buffer upscaling as well as a basic usage of stencil distance in the plugin content. These are all post process materials and can simply be dropped on a post process volume like other post process materials.

    1. StencilWorksDemo_SceneDepth: Shows a debug view like SceneDepth debug visualizer using the upscaled scene depth.
    2. StencilWorksDemo_CustomDepth: Shows a debug view like CustomDepth debug visualizer using the upscaled custom depth.
    3. StencilWorksDemo_CustomStencil: Shows a debug view like CustomStencil debug visualizer using the upscaled custom stencil.
    4. StencilWorksDemo_StencilDistance: Shows a debug view of CustomStencil Bit 1 as a Signed Distance Field render.