@@ -10,7 +10,7 @@
|
||||
/// <summary>
|
||||
/// Current materials shader version.
|
||||
/// </summary>
|
||||
#define MATERIAL_GRAPH_VERSION 161
|
||||
#define MATERIAL_GRAPH_VERSION 162
|
||||
|
||||
class Material;
|
||||
class GPUShader;
|
||||
|
||||
@@ -563,9 +563,10 @@ void MeshData::NormalizeBlendWeights()
|
||||
ASSERT(Positions.Count() == BlendWeights.Count());
|
||||
for (int32 i = 0; i < Positions.Count(); i++)
|
||||
{
|
||||
const float sum = BlendWeights[i].SumValues();
|
||||
Float4& weights = BlendWeights.Get()[i];
|
||||
const float sum = weights.SumValues();
|
||||
const float invSum = sum > ZeroTolerance ? 1.0f / sum : 0.0f;
|
||||
BlendWeights[i] *= invSum;
|
||||
weights *= invSum;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user