Search Unity

Transparent shader without combined overlap.

Discussion in 'Shaders' started by Shaka, Sep 15, 2013.

  1. Shaka

    Shaka

    Joined:
    Apr 24, 2010
    Posts:
    51
    Hello!

    I have several semi transparent planes that at times overlap and I'm trying to achieve this effect:

    $Maxh8.png

    ...rather than what it's doing right now (using the Transparet/Diffuse shader) which is this:

    $5610-untitled-2.png

    Is this possible using shaders?

    Regards/Per
     
  2. Dolkar

    Dolkar

    Joined:
    Jun 8, 2013
    Posts:
    576
    No... Well, not easily. You could mark every pixel where such an object renders with stencil, so that you don't render another one at the same place.
     
  3. Braza

    Braza

    Joined:
    Oct 11, 2013
    Posts:
    136
    Have the same question. Maybe bringing it up would help?
     
  4. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    It sounds like you want to render a bunch of opaque things to a render texture, and then composite that semitransparently to your scene.
     
  5. Braza

    Braza

    Joined:
    Oct 11, 2013
    Posts:
    136
    Sounds about right. Could you pelase elaborate? Is it possible with free edition of Unity?
     
  6. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    No. Render textures are a Pro feature.