On 05.05.2013 23:01, Nozomi Kodama wrote:
FLOAT xw, xx, xy, xz, yw, yy, yz, zw, zz;
I'm not very happy with the additional amount of variables...
Please have a look at the attached patches. I think something like the first one (d3dx9: Apply rotationcenter only when a rotation is done.) should be done but has no influence on your patch (it is only attached, because the second patch influences the same part).
1. The amount of variables needed could be reduced to 3 by reordering the calculations (see patch 2, lines 36 - 58). This could also be done in your patch. Though I'm not sure that's a good idea ... comments and other opinions are welcome.
Below this the points are not directly related to your patch:
2. In the next step we could also avoid a couple of multiplications by multiplying the scaling and adjusting the constants (see patch 2, lines 70 - 79).
3. We could also avoid the temps by reordering the calculation (Doing rotationcenter before the scaling). This way the tempxx could be avoided by using the out matrix directly.
Cheers Rico