mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
Inverse XR camera offset for stereoscopic rendering
This commit is contained in:
parent
655516c758
commit
b1bbbb4439
@ -175,7 +175,7 @@ void RendererSceneRender::CameraData::set_multiview_camera(uint32_t p_view_count
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// 3. Copy our view data
|
||||
for (uint32_t v = 0; v < view_count; v++) {
|
||||
view_offset[v] = p_transforms[v] * main_transform_inv;
|
||||
view_projection[v] = p_projections[v] * CameraMatrix(view_offset[v]);
|
||||
view_offset[v] = main_transform_inv * p_transforms[v];
|
||||
view_projection[v] = p_projections[v] * CameraMatrix(view_offset[v].inverse());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user