Search Unity

Round AOE decals with irregular edges

Discussion in 'General Graphics' started by jctz, Apr 22, 2016.

  1. jctz

    jctz

    Joined:
    Aug 14, 2013
    Posts:
    47
    Hi Gang,

    What's the best way to achieve the effect shown in the attached image? I'm talking about the red circular region with opaque stroke, but also the ability to have cutouts created by objects in the world (highlighted)

    I've implemented something like this with a brute force raycast sampling (ray originating from center of world), and the connecting the hitpoints, and then creating wedges for the semitrans fill and lines for the perimeter.

    Is there a fast shader solution to this? Something like rendering with an top-down ortho camera and using stencil buffer?
     

    Attached Files: