[PATCH v2] d3dx9: Implement D3DXComputeTangent

Matteo Bruni matteo.mystral at gmail.com
Fri Apr 5 13:42:37 CDT 2019


On Fri, Apr 5, 2019 at 6:10 PM Vijay Kiran Kamuju <infyquest at gmail.com> wrote:
>
> On Thu, Apr 4, 2019 at 4:49 PM Matteo Bruni <matteo.mystral at gmail.com> wrote:
> >
> > https://www.winehq.org/pipermail/wine-devel/2017-December/120289.html
> >
> > (Yes, I know that's a different patch and a different function, but not really.)
>
> I will remove the header.
> Other formatting issues are already fixed.
> I have added some simple test cases.
> Are they not enough, Where are the tangents stored inside the mesh?

That's something the test should cover actually. The docs suggest that
the tangent should be stored in the D3DDECLUSAGE_TEXCOORDn vertex
attribute (with n == stage_idx argument) for sure, and optionally also
in a
D3DDECLUSAGE_TANGENT attribute (depending on tangent_idx). Those
should be readable from the mesh vertex buffer e.g. using
LockVertexBuffer(). It would also be interesting to check how things
work with different vertex declarations.
All in all, test_compute_normals() looks like a great example for
writing a test for those D3DXComputeTangent*() functions.



More information about the wine-devel mailing list