Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨

8 Replies

Replies have been turned off for this discussion
  • VR: Mask invisible pixels so GPU time is not wasted (Oculus SDK 1.0+).

    Wonder what, if any, performance gain will be had from that?
  • vrdaveb's avatar
    vrdaveb
    Oculus Staff
    TL;DR: The fix is more for CV1 and DK1, which have significantly asymmetric visibility. DK2 and Gear VR are mostly symmetrical and won't see a significant speedup.

    This fixes an inefficiency we had to introduce to support many built-in and third-party shaders. The problem is that most shaders ignore Camera.projectionMatrix and use only Camera.fieldOfView and Camera.aspect, assuming that +fovX == -fovX and +fovY == -fovY. It would be great if everybody could change their code to support different values for the positive and negative halves of the FOV in each direction, but we aren't holding our breath. So we pad the smaller half of each direction to make the FOV symmetrical as assumed. Only on CV1 (and DK1) this leads to a significant amount of waste because one half of each frustum is significantly bigger than the other half. With 5.3.2p3, Unity culls the excess pixels.
  • "vrdaveb" wrote:
    TL;DR: The fix is more for CV1 and DK1, which have significantly asymmetric visibility. DK2 and Gear VR are mostly symmetrical and won't see a significant speedup.

    This fixes an inefficiency we had to introduce to support many built-in and third-party shaders. The problem is that most shaders ignore Camera.projectionMatrix and use only Camera.fieldOfView and Camera.aspect, assuming that +fovX == -fovX and +fovY == -fovY. It would be great if everybody could change their code to support different values for the positive and negative halves of the FOV in each direction, but we aren't holding our breath. So we pad the smaller half of each direction to make the FOV symmetrical as assumed. Only on CV1 (and DK2) this leads to a significant amount of waste because one half of each frustum is significantly bigger than the other half. With 5.3.2p3, Unity culls the excess pixels.


    Cool, thanks for the explanation!
  • SvenViking's avatar
    SvenViking
    Expert Protege
    I haven't tested thoroughly yet, but it seems like the canvas flickering glitch has been fixed.
  • pdq72's avatar
    pdq72
    Honored Guest
    Hello,

    I have been using the MirrorReflection4 (http://wiki.unity3d.com/index.php/MirrorReflection4) shader and script; however,
    the mirror does not render properly. I believe there was an earlier posting on this where the reflection camera is monoscopic.

    Has this been addressed in p3? Will it soon? I have not completely migrated over to Unity 5 because of this ongoing issue. Unity 4 rendered the mirror just fine in the Rift.

    Thanks.
  • vrdaveb's avatar
    vrdaveb
    Oculus Staff
    It sounds like the effect doesn't properly support the timing of VR rendering. Can you file a bug on Unity by clicking Help > Report a Bug? As a temporary workaround, you may be able to make 2 copies of your camera and set their "Target Eye" to "Left" and "Right" instead of "Both".
  • pdq72's avatar
    pdq72
    Honored Guest
    OMG! :D That worked. Thanks. I was trying all different things thinking it had something to do with the reflection camera fov not updating. What gave away it being a monoscopic issue was when I approached the mirror and then literally closed my left eye followed by my right and noticed the reflection was not stereoscopic.

    I'll still file the report to Unity. Thanks again.