GithubHelp home page GithubHelp logo

ispeakklingon / quickoutline Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chrisnolet/quickoutline

0.0 0.0 0.0 15 KB

Unity asset for adding outlines to game objects

License: MIT License

C# 77.79% ShaderLab 22.21%

quickoutline's Introduction

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 performant

Instructions

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>();

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.

quickoutline's People

Contributors

chrisnolet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.