Post-Processing-Wireframe-Outlines
Post-Processing-Wireframe-Outlines copied to clipboard
A simple post-processing outline effect that uses depth-based edge detection.
Post-Processing Wireframe/Outlines
A wireframe and outline (2-in-1) effect for Unity that uses depth-based edge detection to render thick, quality post-processing wireframes and outlines. You can control the line thickness, edge detection threshold, colour, and blend state. Unlike the typical edge-detection techniques of using a sobel filter/kernel, we compare depth against the local area average- calculated using what is essentially box blur.
Preview
https://github.com/MirzaBeig/Post-Processing-Wireframe-Outlines/assets/37354140/68f099ce-cb16-49e9-93a9-91c42de46f5a
https://github.com/MirzaBeig/Post-Processing-Wireframe-Outlines/assets/37354140/b02f1e77-c708-40dc-8aa7-866f823805d0
Compatibility
- Built-in pipeline.
- Tested with Unity 2021.3 (LTS).
Installation
You'll find everything under Mirza Beig/Post-Processing-Wireframe-Outlines/...
Usage
Easy as,
- Attach these two components to your camera.
- Set to render at least 'Depth', and assign the material.
...That's it.
You can then tweak the material, for example: to get this automatic per-object line colour look.
Or to render thick, painterly strokes- best used in combination with some kind of stylized surface shader.