Skip to content

Commit

Permalink
Merge pull request #66284 from clayjohn/particles-mem-bug
Browse files Browse the repository at this point in the history
Properly initialize motion vectors offset when motion vectors are disabled
  • Loading branch information
akien-mga committed Sep 23, 2022
2 parents 1928492 + aac8d5c commit 03410ef
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@ void RenderForwardClustered::_render_list_template(RenderingDevice::DrawListID p

if ((surf->owner->base_flags & (INSTANCE_DATA_FLAG_MULTIMESH | INSTANCE_DATA_FLAG_PARTICLES)) == INSTANCE_DATA_FLAG_MULTIMESH) {
mesh_storage->_multimesh_get_motion_vectors_offsets(surf->owner->data->base, push_constant.multimesh_motion_vectors_current_offset, push_constant.multimesh_motion_vectors_previous_offset);
} else {
push_constant.multimesh_motion_vectors_current_offset = 0;
push_constant.multimesh_motion_vectors_previous_offset = 0;
}

RD::get_singleton()->draw_list_set_push_constant(draw_list, &push_constant, sizeof(SceneState::PushConstant));
Expand Down

0 comments on commit 03410ef

Please sign in to comment.