Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

VR SpeedTree Billboard Batching Issue

Discussion in '5.4 Beta' started by Alan-Liu, Jul 12, 2016.

  1. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    391
    In our project, we copy the content of depth buffer generated by depth pass, to the depth buffer used by rendering opaque objects, trying to utilize Early Z to avoid some cost of executing pixel shader. Everything is OK except some speedtree billboards flicker. Using RenderDoc, I found the content of depth buffer generated by two passes (depth pass and drawing pass) are not the same completely, which is caused by billboard batching:


    In detph pass, 7 billboards are splitted to two batches, while in draw pass, they are in one batch. So, one billboard is rendered differently in depth pass and draw pass. In depth pass, this billboard's scale is stored in world matrix, while in draw pass, the scale is stored in vertex attribute(TEXCOORD1), so it may cause some error.

    I have this issue when using OpenVR. Unity version is beta 23.

    My question is that is it an expected result or just a bug?
     
    Last edited: Jul 12, 2016
  2. zeroyao

    zeroyao

    Unity Technologies

    Joined:
    Mar 28, 2013
    Posts:
    169
    My gut feeling is it's a bug. We don't do math calculation when SpeedTree billboards are batched, so no floating point error is expected. Please file us a bugreport and I'll have a look ASAP.
     
  3. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    391
    Here are some screenshots.

    Issue:


    Normal:
     
    Last edited: Jul 13, 2016
  4. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    391
    I have submitted the bug report. The case number is 813399.
     
  5. Alan-Liu

    Alan-Liu

    Joined:
    Jan 23, 2014
    Posts:
    391
    Can you take a look at this issue?