diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index 4f868eecf99..21cc2845baa 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -363,7 +363,7 @@ void pshader_m4x3(WINED3DSHADERVECTOR* d, WINED3DSHADERVECTOR* s0, D3DMATRIX34 m void pshader_m3x4(WINED3DSHADERVECTOR* d, WINED3DSHADERVECTOR* s0, D3DMATRIX43 mat) { d->x = mat[0][0] * s0->x + mat[0][1] * s0->y + mat[0][2] * s0->z; - d->y = mat[2][0] * s0->x + mat[1][1] * s0->y + mat[1][2] * s0->z; + d->y = mat[1][0] * s0->x + mat[1][1] * s0->y + mat[1][2] * s0->z; d->z = mat[2][0] * s0->x + mat[2][1] * s0->y + mat[2][2] * s0->z; d->w = mat[3][0] * s0->x + mat[3][1] * s0->y + mat[3][2] * s0->z; PSTRACE(("executing m3x4(1): mat=(%f, %f, %f) s0=(%f) d=(%f) \n", mat[0][0], mat[0][1], mat[0][2], s0->x, d->x)); diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c index a343bcf6556..ed98c9d165c 100644 --- a/dlls/wined3d/vertexshader.c +++ b/dlls/wined3d/vertexshader.c @@ -315,7 +315,7 @@ void vshader_m4x3(WINED3DSHADERVECTOR* d, WINED3DSHADERVECTOR* s0, D3DMATRIX34 m void vshader_m3x4(WINED3DSHADERVECTOR* d, WINED3DSHADERVECTOR* s0, D3DMATRIX43 mat) { d->x = mat[0][0] * s0->x + mat[0][1] * s0->y + mat[0][2] * s0->z; - d->y = mat[2][0] * s0->x + mat[1][1] * s0->y + mat[1][2] * s0->z; + d->y = mat[1][0] * s0->x + mat[1][1] * s0->y + mat[1][2] * s0->z; d->z = mat[2][0] * s0->x + mat[2][1] * s0->y + mat[2][2] * s0->z; d->w = mat[3][0] * s0->x + mat[3][1] * s0->y + mat[3][2] * s0->z; VSTRACE(("executing m3x4(1): mat=(%f, %f, %f) s0=(%f) d=(%f) \n", mat[0][0], mat[0][1], mat[0][2], s0->x, d->x));