Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Single-pass stereo with command buffers

Discussion in 'AR/VR (XR) Discussion' started by pommak, Aug 5, 2016.

  1. pommak

    pommak

    Joined:
    Feb 8, 2013
    Posts:
    5
    I have huge problems rendering my own geometry shader stuff with single-pass stereo enabled. I'm using CommandBuffer.DrawProcedural to render the object during CameraEvent.AfterGBuffer, but the rendered geometry is displayed only on one eye, or not at all. Apparently there's something special I should do within the vs/gs/fs, but it's a bit unclear what that would be.

    I'm using the Unity's macros in the shader (like unity_MatrixVP, which has separate macros for stereo rendering) but it doesn't seem to help. I've also tried to add #pragma multi_compile_instancing to the shader, but it's very unclear what accompanying code I should provide. To be honest, I'm not even sure if that's used with single-pass rendering. Documentation is lacking quite a lot regarding this.

    Can anyone help how to get DrawProcedural with geometry shader to render to both eyes with single-pass on?
     
  2. robinb-u3d

    robinb-u3d

    Unity Technologies

    Joined:
    Jul 13, 2015
    Posts:
    20
    Hi pommak

    This doesn't sound like something we have run across. Can you create a bug for it from the editor with a reproduction project and we'll have a look to see if something is broken in this regard.

    Cheers

    Robin
     
  3. StickmanLeTchoul

    StickmanLeTchoul

    Joined:
    Nov 7, 2016
    Posts:
    1
    Hi Robin,

    Do you know if Unity now supports Single-Pass with DrawProcedural command?
    Doesn't seem to work with Unity 5.4.2.

    Thanks,
    Stickman
     
  4. williamj

    williamj

    Unity Technologies

    Joined:
    May 26, 2015
    Posts:
    94
    Hi @StickmanLeTchoul,

    Could you submit a bug report and post the case number here? I will take a closer look at the problem and get it to the right people.

    Thanks,
    Will
    Unity QA
     
  5. arodic

    arodic

    Joined:
    Nov 15, 2016
    Posts:
    1
    I'd like to bump up this issue since my team is running into this issue. Are there any updates?

    It is unclear why drawProcedural sometimes renders only left and sometimes only right eye. If there was a hack allowing us to call drawProcedural twice (for left and right eye), that would unblock us.
     
  6. ramy_d

    ramy_d

    Joined:
    Oct 12, 2014
    Posts:
    19
    I'd like to also signal that drawprocedural in VR does not work when executed on a camera that has a target eye set to either left or right. There is some kind of weird result when using single-stereo pass but it is still not really working.

    Any help or clarification of the issue would be helpful. thanks.
     
  7. hybrislabs

    hybrislabs

    Joined:
    Oct 27, 2016
    Posts:
    5
    I have the same issue. I'm using Graphis.DrawProcedural and I only see the left eye. I think there are some special shader function I'd need to use, but there is nothing to find about that anywhere.

    Help would really be appreciated as this issue is not really replied to since August...
     
  8. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    Same problem here on 5.5.0p2

    Doesn't seem to be a workaround at the moment. Means we can't run the game relying on one some effects using DrawProcedural at all :/

    Bug number: 866923