refactor: consolidate duplicate ShadowParamsUBO structure definition

Move ShadowParamsUBO from 5 separate shadow rendering functions (2 in
m2_renderer, 1 in terrain_renderer, 1 in wmo_renderer) into shared
vk_frame_data.hpp header. Eliminates 5 identical local struct definitions
and improves consistency across all shadow pass implementations. Structure
layout matches shader std140 uniform buffer requirements.
This commit is contained in:
Kelsi 2026-03-11 11:37:58 -07:00
parent b3d8651db9
commit b5a2175269
4 changed files with 10 additions and 37 deletions

View file

@ -788,15 +788,6 @@ bool TerrainRenderer::initializeShadow(VkRenderPass shadowRenderPass) {
VmaAllocator allocator = vkCtx->getAllocator();
// ShadowParams UBO — terrain uses no bones, no texture, no alpha test
struct ShadowParamsUBO {
int32_t useBones = 0;
int32_t useTexture = 0;
int32_t alphaTest = 0;
int32_t foliageSway = 0;
float windTime = 0.0f;
float foliageMotionDamp = 1.0f;
};
VkBufferCreateInfo bufCI{};
bufCI.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
bufCI.size = sizeof(ShadowParamsUBO);