Giter Site home page Giter Site logo

facepunch.highlight's Introduction

Facepunch.Highlight

Mesh outline effect

Usage

Add 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

facepunch.highlight's People

Contributors

garrynewman avatar

Watchers

 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.