Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
mka's avatar
mka
Explorer
11 years ago

Is distorting and rendering on Rift independent?

I am programming for the DK2 and am using SDK 6.0.0.
If a layer has type ovrLayerType_Disabled, will ovrHmd_SubmitFrame compute the distortion in the texture
buffer even though it is not displayed on the Rift?

3 Replies

  • volgaksoy's avatar
    volgaksoy
    Expert Protege
    Hi mka,

    No need to worry, the compositor does not apply distortion to disabled layers, and in the current implementation will apply distortion in sets of 4 layers at a time (with some exceptions that revolve around the types of layers being used).
  • To quote from the docs about the "Disabled" layer type:
    Ignored by the compositor, disabled layers do not cost performance. We recommend that applications perform basic frustum-culling and disable layers that are out of view. However, there is no need for the application to repack the list of active layers tightly together when turning one layer off; disabling it and leaving it in the list is sufficient.

    So you're all good - "Disabled" does what you'd hope it would.
  • Actually, it is not "all good" and not what I hoped for. It would be nice to have an option to have the distortion computed because it would enable me to implement mouse picking in my geometric modeling program. The way I implemented picking in the past was to encode all shapes and render them. Then I check the code at the pixel where the mouse is.

    I wonder if I could create a extra dummy debug hmd and then switch to it when I need to use the texture buffer for picking? Would that work?