Outlines
Last updated
Last updated
The All In 1 3D Shader provides flexible outline options to help your 3D objects stand out, highlight interactive elements, or achieve stylized looks. Outlines can dramatically enhance the visual appeal of your game with minimal effort.
It's important to understand that the outline solutions provided in All In 1 3D Shader are per-object implementations designed to complement the main shader functionality. While they work well for many common use cases, they have certain limitations:
As a per-object solution, each outlined object requires an additional draw call
Complex intersections between different meshes won't have perfect outline continuity
Performance scales linearly with the number of outlined objects
If your project requires advanced outline solutions (such as global screen-space outlines, perfect outline continuity across multiple objects, or specialized edge detection), consider dedicated outline-specific assets that focus solely on this problem domain and provide post-processing outline solutions.
All In 1 3D Shader offers outlines as part of its comprehensive feature set, but specialized outline assets may provide more robust solutions for projects where outlines are a critical visual element. Also since the outline uses an inverse hull normal extrusion method sharp corners or non smooth meshes can have holes in the outline (to prevent this use Shade Smoothed meshes or avoid sharp corners):
The shader offers four different outline methods, each with its own advantages and use cases:
Disables the outline effect entirely. Use this option when you don't need outlines or want to temporarily disable them without losing your settings.
Has no logic, it will never change, it's a fixed basic implementation that extrudes the mesh along its normals by a customizable width. This is the most common and versatile outline type, suitable for most use cases where a consistent outline is desired.
Creates an outline with constant screen-space width regardless of the object's distance from the camera. This is particularly useful for UI-like elements in 3D space or for maintaining consistent outline visibility at any distance.
An outline that becomes more visible as objects get closer to the camera. This can create interesting effects where objects only show outlines when within interaction range.
Each outline type has two available modes that control how the outline is rendered:
The shader essentially extrudes an Oultline Colored mesh on top of the original mesh.
This mode uses the stencil buffer to prevent the outline from appearing on top of the mesh. It ensures the outline only appears around the silhouette where the mesh isn't visible.