Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
syenet's avatar
syenet
Honored Guest
8 years ago

Oculus's GPU cost of pixel shading is much greater than Vive(SteamVR), why?

I did a simple test for the same scene in Unity 5.6.4p4, just a quad in front of camera covering the whole screen, with a custom PBR shader which executes the PBR lighting model several times, and here's the result (raw app render time in Unity Profiler and GPUView, no compositor involved):
                     32          64         16         4
steamvr       4.75        9.05       2.63     0.69
ovr               8.45       12.58     4.05      1.87
diff               1.78x      1.39x     1.54x    2.71x

I know that SteamVR is using a stencil mesh to save fillrate, but from the statistics the difference is not proportional to the execution times, so it's not solely because of the extra pixels rendered.

OVR uses Adaptive Queue Ahead to trade input lag for CPU framerate, so when porting from Vive to Oculus, I'm currently GPU-bound due to the unknown reason. Anyone has any idea?

5 Replies

Replies have been turned off for this discussion
  • syenet's avatar
    syenet
    Honored Guest


    @syenet

    This is not what we typically
    observe. Are you using the same eye buffer resolution and
    anti-aliasing level for both headsets?


    Hi, I just contacted matthew in email, so I just forward it here, so anyone interested can refer:

    The attached project contains merely the test scene and assets, you need to import the Oculus Integration v1.18
    package from Asset Store yourself, it's too big in size.





    Unity v5.6.4p4, OVRCameraRig.





    Just switch the VR SDK in Player Settings and play the test scene in Unity editor or build a player, check the cost of Render.Mesh in Unity Profiler, see the difference. You can change the variable "ShadingCost" of
    script "NodeCtrl" attached to gameobject "root" in the Scene to adjust the iteration.





    And from the Oculus Mirror, the scene renders a full quad as below:


    While SteamVR's Headset Mirror, the stencil mesh can be clearly seen as below:


    So in my test project, I can say that OVR is not using a stencil mesh at least, or the full quad would not be rendered at corners.





    Thanks for your help.
  • syenet's avatar
    syenet
    Honored Guest


    @syenet

    This is not what we typically
    observe. Are you using the same eye buffer resolution and
    anti-aliasing level for both headsets?


    Hi, I just contacted matthew in email, so I just forward it here, so anyone interested can refer:

    The attached project contains merely the test scene and assets, you need to import the Oculus Integration v1.18
    package from Asset Store yourself, it's too big in size.





    Unity v5.6.4p4, OVRCameraRig.





    Just switch the VR SDK in Player Settings and play the test scene in Unity editor or build a player, check the cost of Render.Mesh in Unity Profiler, see the difference. You can change the variable "ShadingCost" of
    script "NodeCtrl" attached to gameobject "root" in the Scene to adjust the iteration.





    And from the Oculus Mirror, the scene renders a full quad as below:


    While SteamVR's Headset Mirror, the stencil mesh can be clearly seen as below:


    So in my test project, I can say that OVR is not using a stencil mesh at least, or the full quad would not be rendered at corners.





    Thanks for your help.

  • syenet's avatar
    syenet
    Honored Guest


    @syenet

    This is not what we typically
    observe. Are you using the same eye buffer resolution and
    anti-aliasing level for both headsets?


    Hi, I just contacted matthew in email, so I just forward it here, so anyone interested can refer:

    The attached project contains merely the test scene and assets, you need to import the Oculus Integration v1.18
    package from Asset Store yourself, it's too big in size.





    Unity v5.6.4p4, OVRCameraRig.





    Just switch the VR SDK in Player Settings and play the test scene in Unity editor or build a player, check the cost of Render.Mesh in Unity Profiler, see the difference. You can change the variable "ShadingCost" of
    script "NodeCtrl" attached to gameobject "root" in the Scene to adjust the iteration.





    And from the Oculus Mirror, the scene renders a full quad as below:


    While SteamVR's Headset Mirror, the stencil mesh can be clearly seen as below:


    So in my test project, I can say that OVR is not using a stencil mesh at least, or the full quad would not be rendered at corners.





    Thanks for your help.
  • syenet's avatar
    syenet
    Honored Guest


    @syenet

    This is not what we typically
    observe. Are you using the same eye buffer resolution and
    anti-aliasing level for both headsets?


    Hi, I just contacted matthew in email, so I just forward it here, so anyone interested can refer:

    The attached project contains merely the test scene and assets, you need to import the Oculus Integration v1.18
    package from Asset Store yourself, it's too big in size.





    Unity v5.6.4p4, OVRCameraRig.





    Just switch the VR SDK in Player Settings and play the test scene in Unity editor or build a player, check the cost of Render.Mesh in Unity Profiler, see the difference. You can change the variable "ShadingCost" of
    script "NodeCtrl" attached to gameobject "root" in the Scene to adjust the iteration.





    And from the Oculus Mirror, the scene renders a full quad as below:


    While SteamVR's Headset Mirror, the stencil mesh can be clearly seen as below:


    So in my test project, I can say that OVR is not using a stencil mesh at least, or the full quad would not be rendered at corners.





    Thanks for your help.