mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
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:
parent
b3d8651db9
commit
b5a2175269
4 changed files with 10 additions and 37 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue