mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-26 00:40:15 +00:00
wmo: apply MOHD ambient color to interior group lighting
Read the ambient color from the MOHD chunk (BGRA uint32) and store it on WMOModel as a normalized RGB vec3. Pass it through ModelData into the per-batch WMOMaterialUBO (replacing the unused pad[3] bytes, keeping the struct at 64 bytes). The GLSL interior branch now floors vertex colors against the WMO ambient instead of a hardcoded 0.5, so dungeon interiors respect the artist-specified ambient tint from the WMO root rather than always clamping to grey.
This commit is contained in:
parent
8561d5c58c
commit
4d1be18c18
6 changed files with 24 additions and 3 deletions
|
|
@ -353,7 +353,9 @@ private:
|
|||
float heightMapVariance; // 40 (low variance = skip POM)
|
||||
float normalMapStrength; // 44 (0=flat, 1=full, 2=exaggerated)
|
||||
int32_t isLava; // 48 (1=lava/magma UV scroll)
|
||||
float pad[3]; // 52-60 padding to 64 bytes
|
||||
float wmoAmbientR; // 52 (interior ambient color R)
|
||||
float wmoAmbientG; // 56 (interior ambient color G)
|
||||
float wmoAmbientB; // 60 (interior ambient color B)
|
||||
}; // 64 bytes total
|
||||
|
||||
/**
|
||||
|
|
@ -472,6 +474,7 @@ private:
|
|||
std::vector<GroupResources> groups;
|
||||
glm::vec3 boundingBoxMin;
|
||||
glm::vec3 boundingBoxMax;
|
||||
glm::vec3 wmoAmbientColor{0.5f, 0.5f, 0.5f}; // From MOHD, used for interior lighting
|
||||
bool isLowPlatform = false;
|
||||
|
||||
// Doodad templates (M2 models placed in WMO, stored for instancing)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue