My bad.
My patch pass the tests but not yours. Can you check these facts?
Nozomi
Hi Nozomi,
the huge arrays, the loop, it looks a bit ugly. Your implementation makes the D3DXSHRotateZ function a >bit more compatible. What comes into my mind is: D3DXSHRotateZ(out, y, 1,25f, in); D3DXSHRotateZ(out, y, 1,25f, out); D3DXSHRotateZ(out, y, 1,25f, &out[x]); // x ... 1 - y * y D3DXSHRotateZ(&out[x], y, 1,25f, out); // x ... 1 - y * y
Do the last 2 also work and are they producing the same values as native?
Attached is a simple hack to succeed your test, it has some major stuff which needs to be fixed first, but >nevertheless, please have a look. I think the implementation could be a lot smaller and faster. What do you >think? I'd like to hear your opinion, before you try to send a patch.
+FLOAT * WINAPI D3DXSHRotateZ(FLOAT *out, UINT order, FLOAT angle, CONST FLOAT *in) There is a double space after "order,".
Cheers Rico
On 17.10.2012 08:35, Nozomi Kodama wrote:
My bad.
My patch pass the tests but not yours. Can you check these facts?
Nozomi
Oups, I didn't respect the order while setting the output values. Splitting the loop and starting with the smallest index should make the behavior exactly the same as yours (I think). Something like the attached should fix it, please have a look. Though we may use a test for D3DXSHRotateZ(&out[x], y, 1,25f, out)... as of the function gets smaller ... we may generate our expected values by hand. That way we can run all combinations. Not sure if it is worth the effort.
Cheers Rico
Your patch pass the tests. Good. I think my additionnal tests are enought for now. They prove really well what it happens for this function.
I let you send your patch. I will send the tests when your patch is committed.
Can you use j++ instead of ++j. Like this, it will be as the other loops for spherical harmonics part.
Nozomi.
On 17.10.2012 08:35, Nozomi Kodama wrote:
My bad.
My patch pass the tests but not yours. Can you check these facts?
Nozomi
Oups, I didn't respect the order while setting the output values. Splitting the loop and starting with the smallest index should make the behavior exactly the same as yours (I think). Something like the attached should fix it, please have a look. Though we may use a test for D3DXSHRotateZ(&out[x], y, 1,25f, out)... as of the function gets smaller ... we may generate our expected values by hand. That way we can run all combinations. Not sure if it is worth the effort.
Cheers Rico