Search Unity

DirectX11 and Transparency

Discussion in 'Developer Preview Archive' started by RyuMaster, Sep 16, 2012.

  1. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Hi! Unity 4 will support directX11, and I know that directX11 has order independent transparency. That will help to render hair correctly.
    Will that feature be available outside-the-box, or some shader will need to be written to utilize it?
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    DX11 does not have order independent transparency. But with DX11 feature set available at hand (in this case, UAVs, atomics and compute shaders), you could implement order independent transparency. That would be expensive, but order independent.

    We won't be providing that out of the box, but yes, you (or anyone else) could do it. Why not out of the box? Because currently it's more in "fancy R&D" area IMHO - it's nice, it works, but it's both complex to implement and not very practical to use (yet) performance wise.
     
  3. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Got it! Thank you for the detailed explanation
     
  4. phixell

    phixell

    Joined:
    Jun 10, 2010
    Posts:
    11
    If order independent transparency is not supported out of the box. Is there a solution in the box? I am aware of the extra triangle hack, is there a better way?
     
  5. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Extra triangle hack?
     
  6. alexandre-fiset

    alexandre-fiset

    Joined:
    Mar 19, 2012
    Posts:
    715
  7. phixell

    phixell

    Joined:
    Jun 10, 2010
    Posts:
    11
    You add a tiny triangle (too small to be seen) to the object, move it out from the object to increase its bounding box size so it will get sorted properly.
     
  8. smb02dunnal

    smb02dunnal

    Joined:
    May 5, 2012
    Posts:
    439
    Ah fair enough, so does Unity use the center of the bounding box to alpha sort then?