Skip to content

Commit

Permalink
HnRenderPass: properly set pending item's joints buffer offset in str…
Browse files Browse the repository at this point in the history
…uctured mode
  • Loading branch information
TheMostDiligent committed Nov 28, 2024
1 parent 33e5ed6 commit 1744a40
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Hydrogent/src/HnRenderPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,10 +707,18 @@ HnRenderPass::EXECUTE_RESULT HnRenderPass::Execute(HnRenderPassState& RPState, c

ListItem.PrevTransform = Transform.Matrix;

Uint32 JointsBufferOffset = ~0u;
if (Joints)
{
JointsBufferOffset = (State.RendererSettings.JointsBufferMode == USD_Renderer::JOINTS_BUFFER_MODE_UNIFORM) ?
Joints.BufferOffset :
0;
}

m_PendingDrawItems.push_back(PendingDrawItem{
ListItem,
AttribsBufferOffset,
Joints.BufferOffset,
JointsBufferOffset,
});

AttribsBufferOffset += ListItem.ShaderAttribsDataSize;
Expand Down

0 comments on commit 1744a40

Please sign in to comment.