You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a format with the tangent space handedness stored in the tangent's w component, much like the sample mesh format, skinning job doesn't preserve the handedness in the out tangent array. The cause seems to lie in the tangent tranformation code:
Regardless of how in_t is loaded, only the first 3 elements are stored into out_tangents, so in_t.w is undefined in the output array. When passing this to the GPU and computing bitangent as cross(normal, tangent.xyz) * tangent.w, the value is corrupted.
I have a local fix that Works In My Case (tm), but I'd like to know what an ideal fix would be and I'd be happy to incorporate it into the library. My local fix is an SSE only hack with no ref implementation, no NEON variant, etc.
The text was updated successfully, but these errors were encountered:
the behavior you're describing is actually expected. The skinning job only expects 3 components for tangents, as described in the documentation.
The reasoning is:
it does not force tangents to have a handedness component, and not necessarily at w position.
handedness are constant values, aka not transformed by the skinning process. Like vertex colors or uvs, they shall be copied to an immutable vertex buffer to be available in shader code.
When using a format with the tangent space handedness stored in the tangent's w component, much like the sample mesh format, skinning job doesn't preserve the handedness in the out tangent array. The cause seems to lie in the tangent tranformation code:
and
Regardless of how in_t is loaded, only the first 3 elements are stored into out_tangents, so in_t.w is undefined in the output array. When passing this to the GPU and computing bitangent as
cross(normal, tangent.xyz) * tangent.w
, the value is corrupted.I have a local fix that Works In My Case (tm), but I'd like to know what an ideal fix would be and I'd be happy to incorporate it into the library. My local fix is an SSE only hack with no ref implementation, no NEON variant, etc.
The text was updated successfully, but these errors were encountered: