Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Outlines only behind the mesh object.

Discussion in 'Shaders' started by Satoh, Apr 10, 2011.

  1. Satoh

    Satoh

    Joined:
    Feb 17, 2011
    Posts:
    56
    I want to have my object, a 3D cursor mesh, with a stroked border that does not appear in front of the mesh.

    In other words, the outline would only be around the silhouette of the object, but not on the object itself. For this reason, the standard toon shader options are not applicable.

    I don't even really know where to start on this one, but I'm assuming it would require something either in the render call for the object, or a post-render effect... not that that means I know how to start a shader for that...

    I will need to use this effect on other objects, being turned on or off through scripts... Honestly I'm not sure whether I need a script or a shader for this, but I figured this was the better place to ask, since it's more likely that graphics fluent people might be lurking.

    I'm fully willing to do work on my own, but I don't know where to start, so could someone point me toward any existing functions or the right reference material?