(D3D8/D3D9) Do not run unnecessary d3d_matrix_identity call before

d3d_matrix_rotation_z - rotation_z already sets identity matrix for
the matrix
This commit is contained in:
twinaphex 2022-04-25 19:21:52 +02:00
parent 3c3a305eb3
commit 47a1f8f851
3 changed files with 0 additions and 4 deletions

View File

@ -803,7 +803,6 @@ static void d3d8_set_viewport(void *data,
d3d->final_viewport.MaxZ = 0.0f;
d3d_matrix_ortho_off_center_lh(&ortho, 0, 1, 0, 1, 0.0f, 1.0f);
d3d_matrix_identity(&rot);
d3d_matrix_rotation_z(&rot, d3d->dev_rotation * (M_PI / 2.0));
d3d_matrix_multiply(&proj, &ortho, &rot);
d3d_matrix_transpose(&d3d->mvp, &ortho);

View File

@ -925,7 +925,6 @@ static void d3d9_cg_renderchain_calc_and_set_shader_mvp(
CGparameter cgp = cgGetNamedParameter(data, "modelViewProj");
d3d_matrix_ortho_off_center_lh(&ortho, 0, vp_width, 0, vp_height, 0, 1);
d3d_matrix_identity(&rot);
d3d_matrix_rotation_z(&rot, rotation * (D3D_PI / 2.0));
d3d_matrix_multiply(&proj, &ortho, &rot);
d3d_matrix_transpose(&matrix, &proj);

View File

@ -351,9 +351,7 @@ static void hlsl_d3d9_renderchain_calc_and_set_shader_mvp(
d3d_matrix_ortho_off_center_lh(&ortho, 0,
vp_width, 0, vp_height, 0, 1);
d3d_matrix_identity(&rot);
d3d_matrix_rotation_z(&rot, rotation * (D3D_PI / 2.0));
d3d_matrix_multiply(&proj, &ortho, &rot);
d3d_matrix_transpose(&matrix, &proj);