Forum Discussion

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

4 Replies

Replies have been turned off for this discussion
  • AbdulVR's avatar
    AbdulVR
    Honored Guest
    I don't believe it's available anywhere, I am about to write some code to generate it regardless of the current kit you're running.
  • owenwp's avatar
    owenwp
    Expert Protege
    Doing it right requires knowledge of both the distortion algorithm and the user's head shape, since the objective is to stencil out the exact pixels that wont be visible for a particular user through the lens. The oculus automatic camera configuration might help by providing a camera frustum that is already pretty optimal, but chances are you will still get reduction in FOV for some users with a naive implementation.
  • I'm not sure if this will be included in the SDK integration. However you can probably hack it up youself.

    Basically just draw a doughnut mesh around the viewable area in the scene. You should draw it first using DrawMeshNow ( http://docs.unity3d.com/ScriptReference ... shNow.html ). The polygons that are behind will fail the depth test (or the stencil test), which should be what you need.

    Hope that helps.
  • It's seems that you can't use stencil optimization and time warp because you could to mask some useful pixels.