Skip to content

vicot/unity-outline-feature

Repository files navigation

Project inspired by and based on Arvtesh/UnityFx.Outline.

URP only

Installation

  1. Download latest package from Releases and import in project.
  2. Add Outline Feature to renderer settings.
  3. Set Outline Shader to OutlineFeature/Shaders/outlineShader.shader.
  4. Set Masking Shader to OutlineFeature/Shaders/outlineMaskShader.shader.
  5. Add a default material to render hidden parts with.

Demo Scene

For demo scene to work as intended, current render pipeline in project settings/Quality/Render Pipeline Asset must be changed to OutlineFeature/DemoScene/URP-pipeline.

Usage

Per Layer

img_layer.png

  1. Set layer mask in Outline Feature configuration. All objects in these layers will have outline enabled.
  2. Configure other outline settings.

Overlapping objects' outlines will be combined when using layer-based mode.

Per Object

img_object.png

  1. Add Outline Effect component to an object. It must have any renderer (such as MeshRenderer) attached.
  2. Configure outline settings for this object.

Settings

Setting                          
Use global settings (per-object mode only) Use settings from outline render feature
Color HDR Color for the outline
Outline Size Change size of the outline to one of 3 available values
Flags Enable special features
Flag : Use Depth Enable depth tests to draw outline only around the visible part of the object
Flag : Show Hidden Render the hiden part of the object using material set in Renderer settings
- Override Hidden Material (Only when Show Hidden flag is enabled) Use custom material for hidden parts of the object
Flag : Precise (Experimental) Use if object is transformed with vertex shader. This feature will attempt to make the outline match the final shape of the object
- Shader Passes (Only when Precise flag is enabled) Set which shader passes to use when determining the shape of the object. By default all passes for all sub-meshes are used. If provided, a list of pass numbers must be provided for every submesh in order. Use pass number -1 to render all passes for that submesh.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published