-
Notifications
You must be signed in to change notification settings - Fork 231
OpenXR plugin #212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenXR plugin #212
Conversation
Sanakan8472
commented
May 10, 2020
- XR support
- OpenXR plugin added
- Moved companion window logic into XRWindow base class
- Basic input support
- Various camera related fixes to support XR
- Renamed existing VR classes to XR and moved all XR interface code into GameState/XR
- Fixed deployment of release build dependent binaries. Both debug and release dlls are now source files and switch deployment depending on build target
- Removed particle node from HololensRenderPipeline as it is not supported
- Added ReplaceExisitingNativeObject for texture resources
Code/Engine/GameEngine/GameApplication/Implementation/GameApplicationInit.cpp
Outdated
Show resolved
Hide resolved
Code/EditorPlugins/Scene/EnginePluginScene/RenderPipeline/EditorSelectedObjectsExtractor.cpp
Show resolved
Hide resolved
Code/Engine/Foundation/Application/Implementation/uwp/ApplicationEntryPoint_uwp.h
Show resolved
Hide resolved
Code/Engine/GameEngine/Configuration/Implementation/XRConfig.cpp
Outdated
Show resolved
Hide resolved
Code/Engine/GameEngine/GameApplication/Implementation/GameApplicationInit.cpp
Outdated
Show resolved
Hide resolved
Code/Engine/GameEngine/XR/Implementation/DeviceTrackingComponent.cpp
Outdated
Show resolved
Hide resolved
Code/Engine/RendererFoundation/Resources/Implementation/ProxyTexture.cpp
Outdated
Show resolved
Hide resolved
Code/Engine/RendererFoundation/Device/Implementation/Device.cpp
Outdated
Show resolved
Hide resolved
C-Core
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
| // EZ Forward is +X, need to add this to align the forward projection | ||
| const ezMat4 viewMatrix = | ||
| ezGraphicsUtils::CreateLookAtViewMatrix(ezVec3::ZeroVector(), ezVec3(1, 0, 0), ezVec3(0, 0, 1)); | ||
| const ezMat4 mViewTransformLeft = viewMatrix * poseLeft.GetInverse(); | ||
| const ezMat4 mViewTransformRight = viewMatrix * poseRight.GetInverse(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may depend on the coordinate system configuration, which is set in the ezWorld. @C-Core should this be handled here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, if you want to make this future proof, get the coordinate system provider from the world to obtain the forward axis etc
In reply to: 423524360 [](ancestors = 423524360)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I'll put that on my list of things to improve. Too big of a task to do in this PR but might be a good idea to do that before reviving the OpenVR plugin,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frankly, I wouldn't mind ignoring this for the time being. Was just pointing it out, but in practice it's not a problem.
|
|
||
| ezGALResourceFormat::Enum ezOpenXR::ConvertTextureFormat(int64_t format) | ||
| { | ||
| switch (format) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove ezGALResourceFormat at some point and just use ezImageFormat everywhere instead.
(@marcappelsmeier)
You can use ezImageFormatMappings to map between DXGI and ezImageFormat.
You can then use ezTextureUtils to map from ezImageFormat to ezGALResourceFormat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll use that now for the color formats but I still need the switch case for the depth format as they are not in the image format enum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, maybe it would be best to extend that then? I guess it's not in there, because a DDS file can't use the format. Again, not high priority, but we seem to have a proliferation of custom image format handling code.
|
Got a question for @Sanakan8472 Will this plugin support OpenVR? Just curious. |
|
@HeadClot this PR will only add OpenXR as an implementation to the XR interface but the same interface will support OpenVR in the future. There is still old code in the repo for OpenVR support that I'll get back to a working state again soon as iteration times are much better in OpenVR compared to OpenXR when using a Windows Mixed Reality HMD. |
* XR support * OpenXR plugin added * Moved companion window logic into XRWindow base class * Basic input support * Various camera related fixes to support XR * Renamed existing VR classes to XR and moved all XR interface code into GameState/XR * Fixed deployment of release build dependent binaries. Both debug and release dlls are now source files and switch deployment depending on build target * Removed particle node from HololensRenderPipeline as it is not supported * Added ReplaceExisitingNativeObject for texture resources
20d8bac to
cccc29c
Compare