1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Rename Projection matrix to columns

This commit is contained in:
Aaron Franke
2022-10-04 11:44:48 -05:00
parent 0056acf46f
commit 2cea42cc7f
25 changed files with 284 additions and 282 deletions

View File

@@ -388,15 +388,15 @@ Projection WebXRInterfaceJS::get_projection_for_view(uint32_t p_view, double p_a
int k = 0;
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
eye.matrix[i][j] = js_matrix[k++];
eye.columns[i][j] = js_matrix[k++];
}
}
free(js_matrix);
// Copied from godot_oculus_mobile's ovr_mobile_session.cpp
eye.matrix[2][2] = -(p_z_far + p_z_near) / (p_z_far - p_z_near);
eye.matrix[3][2] = -(2.0f * p_z_far * p_z_near) / (p_z_far - p_z_near);
eye.columns[2][2] = -(p_z_far + p_z_near) / (p_z_far - p_z_near);
eye.columns[3][2] = -(2.0f * p_z_far * p_z_near) / (p_z_far - p_z_near);
return eye;
}