Fixed cloth tangent generation (from 'stabilization/2106' @26c9853f)
- The output vectors were not properly filled with zeros when they already had the expected size. - The tolerance was too large and was causing patches while computing tangents and bitangents. - The handedness was inverted to what is expected in the shader (which always inverts tangent's w). Signed-off-by: moraaar <moraaar@amazon.com>
This commit is contained in:
@@ -578,7 +578,7 @@ namespace NvCloth
|
||||
const AZ::Vector3& renderTangent = renderTangents[renderVertexIndex];
|
||||
destTangentsBuffer[index].Set(
|
||||
renderTangent,
|
||||
1.0f);
|
||||
-1.0f); // Shader function ConstructTBN inverts w to change bitangent sign, but the bitangents passed are already corrected, so passing -1.0 to counteract.
|
||||
}
|
||||
|
||||
if (destBitangentsBuffer)
|
||||
|
||||
Reference in New Issue
Block a user