Search Unity

Z Sorting for foliage on iOS

Discussion in 'General Graphics' started by scottharber, Dec 5, 2016.

  1. scottharber

    scottharber

    Joined:
    May 14, 2014
    Posts:
    42
    Hi,

    My team and I are working on a game, which uses a tree model, where the foliage of the tree is created by adding layers of transparent faces. As we're working on iOS, we are using an alpha blend shader to render the foliage, as alpha test is considerably more expensive on iOS. We have found that using the regular transparent shaders cause parts of the foliage polygons to disappear (the transparent polygon faces clip each other). When using a custom shader with Z Write disabled, these parts reappear, but every transparent polygon gets Z sorting issues.

    After browsing other forums, I couldn't find any answer on how to sort transparency per polygon on a given object. Has anyone else found a way around this issue?