Add diagnostics for invisible creatures and update shadow signatures

- Log warning when WotLK M2 skin file is missing (causes invisible creatures)
- Move skin loading inside version >= 264 check to skip unnecessary readFile
- Update renderShadow header signatures to match implementation (shadow culling)
This commit is contained in:
Kelsi 2026-02-23 04:59:39 -08:00
parent 7dc9bf3766
commit 30e9998a86
6 changed files with 27 additions and 15 deletions

View file

@ -63,7 +63,8 @@ public:
void render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet, const Camera& camera);
void recreatePipelines();
bool initializeShadow(VkRenderPass shadowRenderPass);
void renderShadow(VkCommandBuffer cmd, const glm::mat4& lightSpaceMatrix);
void renderShadow(VkCommandBuffer cmd, const glm::mat4& lightSpaceMatrix,
const glm::vec3& shadowCenter = glm::vec3(0), float shadowRadius = 1e9f);
void setInstancePosition(uint32_t instanceId, const glm::vec3& position);
void setInstanceRotation(uint32_t instanceId, const glm::vec3& rotation);

View file

@ -251,7 +251,8 @@ public:
/**
* Render depth-only pass for shadow casting
*/
void renderShadow(VkCommandBuffer cmd, const glm::mat4& lightSpaceMatrix, float globalTime = 0.0f);
void renderShadow(VkCommandBuffer cmd, const glm::mat4& lightSpaceMatrix, float globalTime = 0.0f,
const glm::vec3& shadowCenter = glm::vec3(0), float shadowRadius = 1e9f);
/**
* Render M2 particle emitters (point sprites)

View file

@ -226,7 +226,7 @@ private:
std::unique_ptr<audio::MovementSoundManager> movementSoundManager;
std::unique_ptr<game::ZoneManager> zoneManager;
// Shadow mapping (Vulkan)
static constexpr uint32_t SHADOW_MAP_SIZE = 2048;
static constexpr uint32_t SHADOW_MAP_SIZE = 4096;
VkImage shadowDepthImage = VK_NULL_HANDLE;
VmaAllocation shadowDepthAlloc = VK_NULL_HANDLE;
VkImageView shadowDepthView = VK_NULL_HANDLE;

View file

@ -152,7 +152,8 @@ public:
/**
* Render depth-only for shadow casting
*/
void renderShadow(VkCommandBuffer cmd, const glm::mat4& lightSpaceMatrix);
void renderShadow(VkCommandBuffer cmd, const glm::mat4& lightSpaceMatrix,
const glm::vec3& shadowCenter = glm::vec3(0), float shadowRadius = 1e9f);
/**
* Get number of loaded models