Search Unity

VR and native Rendering plugin: not rendered together with other game objects

Discussion in 'AR/VR (XR) Discussion' started by seb_krueger, Mar 12, 2019.

  1. seb_krueger

    seb_krueger

    Joined:
    Jan 4, 2019
    Posts:
    17
    Hi,

    I'm working on a native rendering plugin which can be used in VR (Microsoft MR).
    The scene perfectly works without VR, but with VR turned on, the content rendered by the plugin can't be visualized together with basic 3D game objects.

    The plugin itself is pretty simpel. It just renders a polygon with D3D11. It is triggered by a camera command buffer (AfterForwardOpaque). In addtion to that, there is one single cube in the scene. Once this one is enabled and cut by the viewing frustum of the camera, the plugin content is gone.
    I already turned off depth and stencil test in the plugin...

    Are there any states or implications introduced by activating VR (and render to texture) which I'm missing?

    Thanks
    Sebastian

    VR on (cube not rendered)
    upload_2019-3-12_17-12-41.png

    VR (cube rendered - plugin content not visible)
    upload_2019-3-12_17-13-37.png

    VR off
    upload_2019-3-12_17-15-56.png
     
  2. seb_krueger

    seb_krueger

    Joined:
    Jan 4, 2019
    Posts:
    17
    I came up with a solution by myself: my polgon got culled. After disabling the back face culling, geometry and my rendering are displayed together.
    Though, it would be nice to know what is the exact reason. What actually flips when another geometry is actually rendered (not clipped away anymore)? Does the vertex winding order changes? Is the culling changed?

    I use UJnity 2018.3.8f1 with the legacy rendering pipeline (I guess since I didn't changed anything from default project settings. For VR I have to use multi pass.
     
    Last edited: Apr 23, 2019