Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chrisnolet/QuickOutline
Unity asset for adding outlines to game objects
https://github.com/chrisnolet/QuickOutline
Last synced: 2 months ago
JSON representation
Unity asset for adding outlines to game objects
- Host: GitHub
- URL: https://github.com/chrisnolet/QuickOutline
- Owner: chrisnolet
- License: mit
- Created: 2018-08-06T06:45:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-23T05:02:06.000Z (8 months ago)
- Last Synced: 2024-08-04T02:09:28.084Z (5 months ago)
- Language: C#
- Size: 14.6 KB
- Stars: 406
- Watchers: 6
- Forks: 48
- Open Issues: 28
-
Metadata Files:
- Readme: Readme.md
- License: License.txt
Awesome Lists containing this project
- awesome-unity-open-source-on-github - QuickOutline - Unity asset for adding outlines to game objects (Outline)
README
Quick Outline
=============Developed by Chris Nolet (c) 2018
About
-----Quick Outline is a world-space outline tool, that adds a solid outline to any object.
It’s ideally suited for VR.
Many outline shaders work in screen space, which makes them slow – and they don’t support MSAA. If they do work in world space, they have ‘gaps’ on hard corners. Quick Outline addresses these issues.
Quick Outline was originally designed for VR, so it supports Instanced Stereo rendering and MSAA. It looks great in any HMD, and it won’t impact the frame rate.
- Designed for VR (including single pass)
- Supports MSAA
- Compatible with post-processing stack
- Multiple outline modes
- Lightweight and performantInstructions
------------To add an outline to an object, drag-and-drop the Outline.cs script onto the object. The outline materials will be loaded at runtime.
You can also add outlines programmatically with:
var outline = gameObject.AddComponent();
outline.OutlineMode = Outline.Mode.OutlineAll;
outline.OutlineColor = Color.yellow;
outline.OutlineWidth = 5f;The outline script does a small amount of work in Awake(). For best results, use outline.enabled to toggle the outline. Avoid removing and re-adding the component if possible.
For large meshes, you may also like to enable 'Precompute Outline' in the editor. This will reduce the amount of work performed in Awake().
Troubleshooting
---------------If the outline appears off-center, please try the following:
1. Set 'Read/Write Enabled' on each model's import settings.
2. Disable 'Optimize Mesh Data' in the player settings.