I
+void pshader_m3x3(WINED3DSHADERVECTOR* d, WINED3DSHADERVECTOR* s0, D3DMATRIX33 mat) {
- d->x = mat[0][0] * s0->x + mat[0][1] * s0->y + mat[2][2] * s0->z;
- d->y = mat[1][0] * s0->x + mat[1][1] * s0->y + mat[2][2] * s0->z;
- d->z = mat[2][0] * s0->x + mat[2][1] * s0->y + mat[2][2] * s0->z;
- d->w = 1.0f;
- PSTRACE(("executing m3x3(1): mat=(%f, %f, %f) s0=(%f)
d=(%f) \n", mat[0][0], mat[0][1], mat[0][2], s0->x, d->x));
- PSTRACE(("executing m3x3(2): mat=(%f, %f, %f) (%f)
(%f) \n", mat[1][0], mat[1][1], mat[1][2], s0->y, d->y));
- PSTRACE(("executing m3x3(3): mat=(%f, %f, %f) X (%f) =
(%f) \n", mat[2][0], mat[2][1], mat[2][2], s0->z, d->z));
- PSTRACE(("executing
m3x3(4): (%f) \n", d->w)); +}
Wrong index, second row.
The first row looks wrong too...