Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Facepunch/Facepunch.Highlight
Mesh outline effect
https://github.com/Facepunch/Facepunch.Highlight
Last synced: 3 months ago
JSON representation
Mesh outline effect
- Host: GitHub
- URL: https://github.com/Facepunch/Facepunch.Highlight
- Owner: Facepunch
- License: mit
- Created: 2018-08-17T11:13:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-20T09:20:50.000Z (over 6 years ago)
- Last Synced: 2024-07-13T00:06:40.308Z (7 months ago)
- Language: C#
- Size: 12.7 KB
- Stars: 317
- Watchers: 21
- Forks: 21
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-unity3d - Facepunch.Highlight - Mesh outline effect (Open Source Repositories / Effect-Highlighter)
- awesome-opensource-unity - Facepunch.Highlight - Mesh outline effect. (Open Source Packages / Effect and Shaders)
- awesome-unity-open-source-on-github - Facepunch.Highlight - Mesh outline effect (Outline)
README
# Facepunch.Highlight
Mesh outline effect![](https://files.facepunch.com/garry/a0ad7775-03ac-49e4-83c0-b89301b6f64b.png)
![](https://files.facepunch.com/garry/b13be668-ba6a-408c-8390-4a016c4d06af.png)
![](https://files.facepunch.com/garry/6a5153b3-5996-4a31-9005-2b66e811c563.png)
![](https://files.facepunch.com/garry/745b7309-942e-44ff-a1ca-8dd065c7a943.png)
# UsageAdd Highlighter.cs to your camera (or anywhere else and set the camera reference). There's some static functions that will make things easier if you're only using one type of outline.
```
Highlight.ClearAll();
Highlight.AddRenderer( HoveredRendererer );
Highlight.AddRenderer( SomeOtherRendererer );
Highlight.Rebuild();
```Optimally you should only update the a highlighter when things change, not every frame, but it's not going to kill you if you do.
# Pros And Cons
Pros | Cons
-----|------
Can add multiple highlighters for different line colours/widths | Only one line colour/width per highlighter
Only costs perf when being used | Only works in deferred render mode
No need to add components to all your renderers | Needs depth texture generation on camera
Only re-renders the target objects | Transparent stuff won't occlude
Doesn't need to render potentially occluding objects |
Can draw occluded lines a different colour |
Lines can glow and bloom by providing a HDR color |
Lines can get anti-aliased by post process |
You can edit the shader to do whatever you want |
Works on skinned meshes |
MIT license |