Refactor engine to support double-precision vectors

This commit is contained in:
Wojtek Figat
2022-06-13 00:40:32 +02:00
parent f82e370392
commit a881c90b2e
744 changed files with 19062 additions and 12467 deletions

View File

@@ -84,7 +84,7 @@ private:
newVertex.Normal = oldVertex.Normal;
newVertex.Tangent = oldVertex.Tangent;
newVertex.BlendIndices = oldVertex.BlendIndices;
Vector4 blendWeights = Vector4(oldVertex.BlendWeights.R / 255.0f, oldVertex.BlendWeights.G / 255.0f, oldVertex.BlendWeights.B / 255.0f, oldVertex.BlendWeights.A / 255.0f);
Float4 blendWeights(oldVertex.BlendWeights.R / 255.0f, oldVertex.BlendWeights.G / 255.0f, oldVertex.BlendWeights.B / 255.0f, oldVertex.BlendWeights.A / 255.0f);
const float sum = blendWeights.SumValues();
const float invSum = sum > ZeroTolerance ? 1.0f / sum : 0.0f;
blendWeights *= invSum;