Skip to content

Commit

Permalink
Fix mvec calculation of dynamic geometry (#400)
Browse files Browse the repository at this point in the history
Co-authored-by: Ren.Haocheng <[email protected]>
  • Loading branch information
wylighting and Ren.Haocheng authored Oct 30, 2023
1 parent 8526e89 commit 921b3f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Falcor/Scene/Raster.slang
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ VSOut defaultVS(VSIn vIn)
GeometryInstanceData instance = gScene.getGeometryInstance(instanceID);
if (instance.isDynamic())
{
uint prevVertexIndex = gScene.meshes[instance.geometryIndex].prevVbOffset + vIn.vertexID;
uint prevVertexIndex = gScene.meshes[instance.geometryID].prevVbOffset + vIn.vertexID;
prevPos = gScene.prevVertices[prevVertexIndex].position;
}
float3 prevPosW = mul(gScene.getPrevWorldMatrix(instanceID), float4(prevPos, 1.f)).xyz;
Expand Down

0 comments on commit 921b3f6

Please sign in to comment.