diff options
-rw-r--r-- | src/mame/video/chihiro.cpp | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/src/mame/video/chihiro.cpp b/src/mame/video/chihiro.cpp index 0dd6aaba5d4..82d92dfe848 100644 --- a/src/mame/video/chihiro.cpp +++ b/src/mame/video/chihiro.cpp @@ -2360,7 +2360,6 @@ void nv2a_renderer::convert_vertices_poly(vertex_nv *source, nv2avertex_t *desti { vertex_nv vert[4]; int m, u; - //float t[4]; float v[4]; // take each vertex with its attributes and obtain data for drawing @@ -2369,32 +2368,11 @@ void nv2a_renderer::convert_vertices_poly(vertex_nv *source, nv2avertex_t *desti // transformation matrices // this part needs more testing for (m = 0; m < count; m++) { -#if 0 - for (int i = 0; i < 4; i++) { - t[i] = 0; - // in matrix.modelview[c][r] c is the column and r is the row of the direct3d matrix - for (int j = 0; j < 4; j++) - t[i] += matrix.modelview[i][j] * source[m].attribute[0].fv[j]; - }; - for (int i = 0; i < 4; i++) { - v[i] = 0; - for (int j = 0; j < 4; j++) - v[i] += matrix.composite[i][j] * t[j]; - }; -#else for (int i = 0; i < 4; i++) { v[i] = 0; for (int j = 0; j < 4; j++) v[i] += matrix.composite[i][j] * source[m].attribute[0].fv[j]; }; -#endif - /* it seems these are not needed ? - for (int i = 0; i < 3; i++) { - v[i] *= matrix.scale[i]; - } - for (int i = 0; i < 3; i++) { - v[i] += matrix.translate[i]; - }*/ destination[m].w = v[3]; destination[m].x = (v[0] / v[3])*supersample_factor_x; // source[m].attribute[0].fv[0]; destination[m].y = (v[1] / v[3])*supersample_factor_y; // source[m].attribute[0].fv[1]; @@ -3505,17 +3483,17 @@ int nv2a_renderer::geforce_exec_method(address_space & space, UINT32 chanel, UIN // modelview matrix if ((maddress >= 0x0480) && (maddress < 0x04c0)) { maddress = (maddress - 0x0480) / 4; - /* the modelview matrix is obtained by direct3d by multiplyng the world matrix and the view matrix + /* the modelview matrix is obtained by direct3d by multiplying the world matrix and the view matrix modelview = world * view given a point in 3d space with coordinates x y and z, to find te transformed coordinates - first create a row vector with components (x,y,z,1) then multyply the vector by the matrix + first create a row vector with components (x,y,z,1) then multiply the vector by the matrix transformed = rowvector * matrix in direct3d the matrix is stored as the sequence (first digit row, second digit column) 11 12 13 14 21 22 23 24 31 32 33 34 41 42 43 44 - but it is sent trasposed as the sequence + but it is sent transposed as the sequence 11 21 31 41 12 22 32 42 13 23 33 43 14 24 34 44 so in matrix.modelview[x][y] x is the column and y is the row of the direct3d matrix */ |