mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-24 08:00:14 +00:00
Hide M2 particle emitter volumes rendering as grey boxes
M2 models like OrgrimmarFloatingEmbers and OrgrimmarSmokeEmitter have a simple box mesh (24 verts, 36 indices) meant only to define particle emitter bounds. Their blendMode was 0 (opaque), causing them to render as large grey boxes. Detect these by checking for box geometry with particle emitters and large bounds (>5 units), then mark as invisible. Also add ANTIPORTAL and batch-disable flag checks to WMO group filtering.
This commit is contained in:
parent
1cfe186c62
commit
6dd811a926
3 changed files with 23 additions and 3 deletions
|
|
@ -371,6 +371,7 @@ bool WMORenderer::loadModel(const pipeline::WMOModel& model, uint32_t id) {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
bool alphaTest = false;
|
||||
uint32_t blendMode = 0;
|
||||
if (batch.materialId < modelData.materialBlendModes.size()) {
|
||||
|
|
@ -1206,9 +1207,11 @@ void WMORenderer::render(const Camera& camera, const glm::mat4& view, const glm:
|
|||
for (uint32_t gi : dl.visibleGroups) {
|
||||
const auto& group = model.groups[gi];
|
||||
|
||||
// Skip groups with SHOW_SKYBOX flag (0x20000) — these are transparent
|
||||
// sky windows meant to show the skybox behind them, not solid geometry
|
||||
if (group.groupFlags & 0x20000) {
|
||||
// Skip non-renderable groups:
|
||||
// 0x20000 = SHOW_SKYBOX (transparent sky windows)
|
||||
// 0x4000000 = ANTIPORTAL (occlusion planes, not visible geometry)
|
||||
// 0x8000000 = disables batch rendering
|
||||
if (group.groupFlags & (0x20000 | 0x4000000 | 0x8000000)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -1218,6 +1221,7 @@ void WMORenderer::render(const Camera& camera, const glm::mat4& view, const glm:
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
// STORMWIND.WMO specific fix: LOD shell visibility control
|
||||
// Combination of distance culling + backface culling for best results
|
||||
bool isLODShell = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue