Skip to content

Commit

Permalink
VertexAttributesToInputLayout: set IsNormalized flag for uint8 and in…
Browse files Browse the repository at this point in the history
…t8 attributes
  • Loading branch information
TheMostDiligent committed May 7, 2023
1 parent 551dcdc commit 3cfb1e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions AssetLoader/src/GLTFLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ InputLayoutDescX VertexAttributesToInputLayout(const VertexAttributeDesc* pAttri
InputLayoutDescX InputLayout;
for (Uint32 i = 0; i < NumAttributes; ++i)
{
const auto& Attrib = pAttributes[i];
InputLayout.Add(i, Attrib.BufferId, Attrib.NumComponents, Attrib.ValueType, false, Attrib.RelativeOffset);
const auto& Attrib = pAttributes[i];
const auto IsNormalized = (Attrib.ValueType == VT_UINT8 || Attrib.ValueType == VT_INT8);
InputLayout.Add(i, Attrib.BufferId, Attrib.NumComponents, Attrib.ValueType, IsNormalized, Attrib.RelativeOffset);
}
return InputLayout;
}
Expand Down

0 comments on commit 3cfb1e7

Please sign in to comment.