-
Notifications
You must be signed in to change notification settings - Fork 0
Plugin Settings
Global enable for the plugin.
Automatically resize the distance field render target. Can alternatively use the UpdateResolution function found in the subsystem or if in the editor, the refresh icon in the top right
Runs an extra pass to automatically detect what stencils are present in the viewport. Distance Fields that use a render target as a source are exempt from this.
This array sets up which stencils to use and what kind of outline type is required.
Local enable for the specific distance field pass.
Enum that selects which source to use for the creation of the distance fields
- Stencil
- Render Target
Shown if Outline Source is Stencil. The stencil in question is the depth/stencil buffer.
Whether or not to use a specified stencil group.
The index of the stencil to use or the index of the stencil group if enabled.
Shown if Outline Source is Render Target. The render target is a render target asset that can be selected in the content window.
The source texture is what will be used for the creation of the distance field. Similar to the stencil. This needs to be a solid colour on the red channel.
An optional process mask that can be used to dictate which pixels to be calculated. It can help improve the performance.
- Simple - outline is your standard 2px outline. It's much faster than the distance field however you can't do too much with it. It uses the distance field texture but only has values of 0 for the edge and 1 everywhere else.
- Distance Field - generates the proper distance field. Values range from 0 (the edge) to 1, the furthest in UV space.
- Every Frame - updates the distance fields on every frame that gets rendered.
- Target Frame Rate - updates based on the target frame rate in seconds. This is calculated based on the render pass and only runs an update when the current elapsed time is greater than the target rate.
- On Demand - requires an update request. More useful for offline situations or any situation where the update might not occur more than once a second.
Shown only if Outline Type is Distance Field. The general configuration settings for a distance field outline.
Specifies the number of extra passes to render. Generally, this should be fine at 0 but if a little extra quality is needed, this can be increased.
Runs an extra pass that performs a simple box blur on the distance field.
By downsampling the stencil buffer, the result can be used to then indicate an early exit for the Distance Field or Simple outline passes.
Limits the number of passes and in doing so only creates a distance field that extends the specified distance while improving performance. Note: If you pass in a value higher than the screen resolution, it will default to full resolution.
- None - Standard passes
- Half JFA - cuts the number of pixels processed by 75% and thus improves performance albeit at the cost of accuracy. The accuracy closer to the line edge is worse but is fine at larger distances.
- Checkerboard JFA - Like the half JFA this only cuts down the pixels processed by 50%.
Options for downscaling the distance field outline. This can work alongside the optimisations however they perform after the downscaling.
Percentage of the full resolution - 1 being 100%
- Nearest
- Bi-linear
- Tri-linear
How to sample the downscaled texture during the initial outline (distance field seeding) operation.
Used for the distance from the target value (1 if using a render target or the stencil value if using the stencil buffer as a source) both above and below. Can shift the edge inwards or outwards.
Each stencil group represents individual stencil values. When grouped and used, the first value in the group is what all the values in the group will be set to. Example: group [1, 2, 5, 7] and [3, 6, 9, 10] any pixels with a stencil value represented by these groups will be set to 1 and 3 respectively.
Global enable for the plugin.
Automatically resize the distance field render target. Can alternatively use the UpdateResolution function found in the subsystem or if in the editor, the refresh icon in the top right
This array sets up which stencils to use and what kind of outline type is required.
Local enable for the specific distance field pass.
The stencil that is used to generate the distance field.
- Distance Field - self-explanatory.
- Single Pixel Inside - uses a very fast shader pass to generate an outline a single pixel thick just inside of the stencil.
- Single Pixel Outside - like above except just outside.
- Double Pixel - a combination of both single-pixel options.
By downsampling the stencil buffer, the result can be used to then indicate an early exit for the Distance Field or Simple outline passes.
Notes:
- Each downsample pass also extends the coverage as opposed to being a direct downsample.
- Low screen resolutions may incur a performance penalty, so test appropriately.
- If this setting is set on any Distance Field entry, all simple outlines (Single/Double) will automatically use this as the cost would be "free". The value for those will also be set to the lowest value.
This is an optimisation for the Distance Field outline type. It limits the number of passes and in doing so only creates a distance field that extends the specified distance while improving performance.
Note: If you pass in a value higher than the screen resolution, it will default to full resolution.
This is an optimisation for the Distance Field outline type. The pass is run at half resolution then upscaled and smoothed for the final result. Good for soft or extra thick outlines.