-
Notifications
You must be signed in to change notification settings - Fork 37
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
Adds multiview to CubeXr #459
base: main
Are you sure you want to change the base?
Conversation
0a6c0f1
to
a95f45a
Compare
fd23139
to
369de87
Compare
@@ -269,20 +273,29 @@ void CubeXrApp::Render() | |||
// Update uniform buffer. | |||
{ | |||
float t = GetElapsedSeconds(); | |||
float4x4 P = glm::perspective(glm::radians(60.0f), GetWindowAspect(), 0.001f, 10000.0f); | |||
float4x4 V = glm::lookAt(float3(0, 0, 0), float3(0, 0, 1), float3(0, 1, 0)); | |||
float4x4 M = glm::translate(float3(0, 0, -3)) * glm::rotate(t, float3(0, 0, 1)) * glm::rotate(t, float3(0, 1, 0)) * glm::rotate(t, float3(1, 0, 0)); |
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.
Can we rework this logic a bit?
- I am not sure if this currently works with non-XR, we have to make sure it still works
- Can we add a GetCamera(viewIndex) and get the matrices that way, then we wouldn't have to add additional methods to the xr component
@@ -68,12 +68,12 @@ void CubeXrApp::Setup() | |||
|
|||
// Pipeline | |||
{ | |||
std::vector<char> bytecode = LoadShader("basic/shaders", "VertexColors.vs"); | |||
std::vector<char> bytecode = LoadShader("basic/shaders", "VertexColorsMulti.vs"); |
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.
Can you find the spec language that says the view index is going to be 0 if there is not multiview in the shader? Otherwise maybe better to use VertexColors if there is no multiview?
Adds multiview into Cube_XR. This is a followup to pr#419 where multiview was added to the repo.