mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix game objects rendering with player textures
When M2Renderer's descriptor pool was exhausted, batch.materialSet would be VK_NULL_HANDLE and the bind was skipped, but the draw call still executed using the previously bound descriptor set from CharacterRenderer — causing game objects to render with the player's skin/armor textures. Skip the entire batch instead.
This commit is contained in:
parent
739ae5b569
commit
2a1bd12f5b
1 changed files with 5 additions and 5 deletions
|
|
@ -2381,11 +2381,11 @@ void M2Renderer::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet, const
|
|||
}
|
||||
}
|
||||
|
||||
// Bind material descriptor set (set 1)
|
||||
if (batch.materialSet) {
|
||||
// Bind material descriptor set (set 1) — skip batch if missing
|
||||
// to avoid inheriting a stale descriptor set from a prior renderer
|
||||
if (!batch.materialSet) continue;
|
||||
vkCmdBindDescriptorSets(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS,
|
||||
pipelineLayout_, 1, 1, &batch.materialSet, 0, nullptr);
|
||||
}
|
||||
|
||||
// Push constants
|
||||
M2PushConstants pc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue