Comments (3)
In case anyone sees this later, the values returned by GetProjectionRaw are actually the tangents of the half-angles from the center view axis to the respective clip planes.
I assume this is because then the API doesn't need to take in a value for the near plane distance, like most APIs that provide 'left right top bottom' values for projection matrix generation, with the assumption that those values lie on the near plane itself. If you look at the documentation for XMMatrixPerspectiveOffCenterLH, you can see that the 'lrtb' coordinates are defined as being on the near clipping plane.
As for why the OpenVR API decided to use the tangent of the half-angles, I think it's because it elegantly generates other useful values easily. Do you need the FOV? You can use arctan to get the radians of the half angle. Do you actually want the 'lrtb' coordinates in view space? Simply multiply them by your near plane distance. For example:
*pfRight = tan(rightHalfAngle) = rightDistance/nearDistance =>
rightDistance = nearDistance x *pfRight
The only quarrel I have with the API is that it doesn't really make note that they are tangent values. I updated the wiki, hopefully that helps!
from openvr.
Why not use the conventional provided projection via
GetProjectionMatrix
instead as stated in the documentation:
"Most games should use GetProjectionMatrix instead of this method, but sometimes a game needs to do something fancy with its projection and can use these values to compute its own matrix."
https://github.com/ValveSoftware/openvr/wiki/IVRSystem::GetProjectionRaw
from openvr.
Hello, can you help me here: Modify GetProjectionRaw from a console application
from openvr.
Related Issues (20)
- [SUGGESTION] Open-sourcing the Oculus driver?
- [BUG] Point_viewcontrol crashes the game. HOT 7
- [BUG] SteamVR/OpenXR Suggested Bindings not working for ViveTracker Menu button (Naming mismatch) HOT 2
- Joysitck not work when click or touch is added HOT 1
- The depth test between overlays fails in some cases (v2.5.1) HOT 1
- Walking via treadmill or trackers - only possible by simulating trackpad/thumbstick? Or can we move HMD pose? HOT 1
- Initializing Looking for your VR hardware issue HOT 1
- Retrieving joystick values from controllers via VrInput or GetControllerState results in invalid handlers
- Idea: The ability to save the active world scale setting in memory without wtiting to disk HOT 1
- SteamVR bindings not editable
- Why is the driver pose different from the application pose?
- How to customize my own tracker to work with OpenXR games?
- Global input override between overlay applications
- Idea: Add outer deadzone for Thumbstick Settings HOT 1
- Query current ActionManifestPath
- Simple HMD sample driver seems to be broken without any editing HOT 2
- No output with OpenXR application
- SteamVR breaks when adding settingsschema.vrsettings to non HMD driver HOT 1
- [BUG]: Cannot open the developer console, or close SteamVR HOT 1
- helloworldoverlay UI is not responsive
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openvr.