Handy Things to Move Into the SDK
Hey Rift Peeps!
While working on the HMD side of the SDK I found that I needed to dissect and make use of parts of the OculusWorldDemo. These calculations will be required for anyone that is attempting to use the distortion shader so are good candidates to move out of the demo and into the SDK itself. Perhaps they could go under a utilities section, or even as part of the HMDInfo class?
XCenterOffset
This is currently calculated as part of StereoConfig::updateDistortionOffsetAndScale(). This could be a function that takes a HMDInfo and returns the calculated XCenterOffset.
Distortion Scale
This is also currently calculated as part of StereoConfig::updateDistortionOffsetAndScale(). This could be a function that takes a HMDInfo and returns the calculated Scale. It would also be good to have an optional bool that will calculate the Scale without attempting to fit in any direction (i.e. don't want to upscale the input texture). In the current StereoConfig calculation this would be the equivalent of setting both DistortionFitX and DistortionFitY to 0.
Vertical FOV
Currently calculated as part of StereoConfig::updateComputedState(). This function could take a HMDInfo along with the distortion Scale calculated above and return the vertical FOV.
Thanks!
- Dave
While working on the HMD side of the SDK I found that I needed to dissect and make use of parts of the OculusWorldDemo. These calculations will be required for anyone that is attempting to use the distortion shader so are good candidates to move out of the demo and into the SDK itself. Perhaps they could go under a utilities section, or even as part of the HMDInfo class?
XCenterOffset
This is currently calculated as part of StereoConfig::updateDistortionOffsetAndScale(). This could be a function that takes a HMDInfo and returns the calculated XCenterOffset.
Distortion Scale
This is also currently calculated as part of StereoConfig::updateDistortionOffsetAndScale(). This could be a function that takes a HMDInfo and returns the calculated Scale. It would also be good to have an optional bool that will calculate the Scale without attempting to fit in any direction (i.e. don't want to upscale the input texture). In the current StereoConfig calculation this would be the equivalent of setting both DistortionFitX and DistortionFitY to 0.
Vertical FOV
Currently calculated as part of StereoConfig::updateComputedState(). This function could take a HMDInfo along with the distortion Scale calculated above and return the vertical FOV.
Thanks!
- Dave
