Dedicated Vulkan pipeline with alpha blending AND depth writes so
windows look transparent at oblique angles without see-through artifacts.
Fresnel alpha ranges from 0.4 (grazing) to 0.95 (head-on) with sun
glint, reflections, and silver-lining specular.
- Add error handling: revert to 1x if recreateSwapchain fails
- Clamp requested MSAA to device maximum before applying
- Retry MSAA color image allocation without TRANSIENT on failure
- Remove redundant vkDeviceWaitIdle from WMO/M2/Character recreatePipelines
(caller already waits once, was causing ~13 stalls instead of 1)
- ensure player transform sync is not gated by third-person so player shadow stays consistent
- hold shadow projection center during movement and snap once on stop to remove delayed catch-up
- smooth foliage caster transitions using blended phase-shifted UV samples
- tune foliage motion frequencies/amplitudes for less popping
- increase shadow map resolution to 2048 and retune terrain PCF texel scale
- increase global shadow strength from 0.62 to 0.68 for stronger, clearer shadows
- keep shadow projection center fixed while moving to remove per-frame projection churn flicker
- replace delayed post-move catch-up with immediate stop transition and idle smoothing
- rework foliage shadow caster motion to use blended phase-shifted UV samples for continuous position transitions
- reduce high-frequency foliage threshold popping by removing threshold warping path
- sharpen terrain receive filtering with tuned 5-tap PCF weights/offset for more detailed shadows
- raise shadow map resolution to 1536 and keep light-space texel snapping for stable sampling
- set shadows enabled by default and lower global shadow strength from 0.65 to 0.62
- keep foliage animation speed consistent between moving and idle at 80%
- SHADOW_MAP_SIZE 2048→1024: 4x fewer pixels rasterized in depth pass
- Replace 9-tap manual PCF loop with single hardware PCF tap in all 4 receiver
shaders (terrain.frag, wmo_renderer, m2_renderer, character_renderer).
GL_LINEAR + GL_COMPARE_REF_TO_TEXTURE already gives 2×2 bilinear PCF per
tap for free, so quality is maintained while doing 9x fewer texture fetches.
- Throttle shadow depth pass to every 2 frames; OpenGL depth texture persists
between frames so receivers always have a valid shadow map. 1-frame lag at
60 fps is invisible.
- game_handler.cpp: use-after-move on node.id after std::move(node)
(save nodeId before the move)
- tcp_socket.cpp, world_socket.cpp: virtual call in destructor bypasses
dispatch; use qualified TCPSocket::disconnect() / WorldSocket::disconnect()
to make intent explicit
- wmo_renderer.cpp: float loop counters risk precision drift; replace with
integer step counts and reconstruct float from index
- game_screen.cpp: (float + 0.5) cast to int is incorrect rounding;
use std::lround instead
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.
- Skip WMO batches with material flags F_SIDN (0x20) or F_WINDOW (0x40)
which are transparent sky/window panes that render as grey curtains
- Fix /unstuck: always nudge 5 units forward first, then sample floor at
destination instead of teleporting back to last safe position (which
could be the stuck location itself)
The previous fix only skipped groups where ALL batches were untextured.
Groups with a mix of textured and untextured batches still rendered the
untextured ones as solid grey geometry. Now skip each untextured batch
individually during rendering.
- Per-family mount sounds (kodo, tallstrider, mechanostrider, etc.) detected from M2 model path
- Skip WMO groups with SHOW_SKYBOX flag or all-untextured batches (grey mesh in Orgrimmar)
- Freeze physics during taxi landing until terrain loads to prevent falling through void
- Disable bone animations on tropical vegetation (palm, bamboo, banana, etc.) to fix wiggling
- Snap player to final taxi waypoint on flight completion
- Extract mount aura spell ID from classic UNIT_FIELD_AURAS for CMSG_CANCEL_AURA dismount
- Increase /unstuck forward nudge to 5 units
- Added transport fields to MovementInfo struct (transportGuid, transportX/Y/Z/O, transportTime)
- Updated MovementPacket::build() to serialize transport data when ONTRANSPORT flag set
- Modified GameHandler::sendMovement() to include transport info when player on transport
- Fixed coordinate conversion for transport offsets (server↔canonical)
- Added transport tracking in both CREATE_OBJECT and MOVEMENT update handlers
- Connected M2Renderer to WMORenderer for hierarchical doodad transforms
- Server-authoritative transport movement (no client-side animation)
Issue: Server not sending MOVEMENT updates for transports, so they remain stationary.
Transports register successfully but don't animate without server position updates.
Transport System (Phases 1-7):
- Implement TransportManager with Catmull-Rom spline path interpolation
- Add WMO dynamic transforms for moving transport instances
- Implement player attachment via world position composition
- Add test transport with circular path around Stormwind harbor
- Add /transport board and /transport leave console commands
- Reuse taxi flight spline system and external follow camera mode
NPC Spawn Fixes:
- Add smart ocean spawn filter: blocks land creatures at high altitude over water (Z>50)
- Allow legitimate water creatures at sea level (Z≤50) to spawn correctly
- Fixes Elder Grey Bears, Highland Striders, and Plainscreepers spawning over ocean
- Snap online creatures to terrain height when valid ground exists
NpcManager Removal:
- Remove deprecated NpcManager (offline mode no longer supported)
- Delete npc_manager.hpp and npc_manager.cpp
- Simplify NPC animation callbacks to use only creatureInstances_ map
- Move NPC callbacks to game initialization in application.cpp
Water Rendering:
- Fix tile seam gaps caused by per-vertex wave randomization
- Add distance-based blending: seamless waves up close (<150u), grid effect far away (>400u)
- Smooth transition between seamless and grid modes (150-400 unit range)
- Preserves aesthetic grid pattern at horizon while eliminating gaps when swimming
Add SkySystem coordinator that follows WoW's actual architecture where skyboxes
are authoritative and procedural elements serve as fallbacks. Integrate lighting
system across all renderers (terrain, WMO, M2, character) with unified parameters.
Sky System:
- SkySystem coordinator manages skybox, celestial bodies, stars, clouds, lens flare
- Skybox is authoritative (baked stars from M2 models, procedural fallback only)
- skyboxHasStars flag gates procedural star rendering (prevents double-star bug)
Celestial Bodies (Lore-Accurate):
- Two moons: White Lady (30-day cycle, pale white) + Blue Child (27-day cycle, pale blue)
- Deterministic moon phases from server gameTime (not deltaTime toys)
- Sun positioning driven by LightingManager directionalDir (DBC-sourced)
- Camera-locked sky dome (translation ignored, rotation applied)
Lighting Integration:
- Apply LightingManager params to WMO, M2, character renderers
- Unified lighting: directional light, diffuse color, ambient color, fog
- Star occlusion by cloud density (70% weight) and fog density (30% weight)
Documentation:
- Add comprehensive SKY_SYSTEM.md technical guide
- Update MEMORY.md with sky system architecture and anti-patterns
- Update README.md with WoW-accurate descriptions
Critical design decisions:
- NO latitude-based star rotation (Azeroth not modeled as spherical planet)
- NO always-on procedural stars (skybox authority prevents zone identity loss)
- NO universal dual-moon setup (map-specific celestial configurations)
- Add distance-based + backface culling for STORMWIND.WMO LOD shell groups
- Hide floating cathedral shell when within 185 units of group center
- Enable backface culling for LOD shell to reduce artifacts from inside
- Increase WMO view distance from 160 to 500 units for better visibility
- Extend fog distances to 3000-4000 units for clearer long-range views
- Add fog support to water renderer matching WMO fog settings
Previous threshold (worldZ > 150) was too aggressive and hid Group 95
at worldZ=162 which is legitimate cathedral geometry.
New approach: Only hide groups that are BOTH:
- High: worldZ > 180
- Very tall: sizeZ > 100
This specifically targets ONLY the floating shell:
- Group 92: worldZ=225, sizeZ=251 ✓ culled
- Group 93: worldZ=201, sizeZ=165 ✓ culled
While preserving legitimate geometry:
- Group 95: worldZ=162, sizeZ=131 ✓ kept (Z < 180)
- All other groups: Z < 180 ✓ kept
Identified the floating LOD shell from Z-position analysis:
- Group 92: worldZ=225 (flags=0x7d2, 251.5 units tall!)
- Group 93: worldZ=201.6 (flags=0x7e1, 165.4 units tall!)
These groups are positioned WAY above the normal cathedral geometry
(which sits at worldZ 98-122). They're the simplified distant shell
meant to make the cathedral look impressive from far away.
Fix: Skip rendering groups with worldZ > 150.0
This hides the floating shell while keeping all normal cathedral
geometry visible.
The threshold of 150 sits safely between:
- Normal cathedral: 98-122
- Floating shell: 200-225
Enhanced STORMWIND.WMO logging to show:
- centerZ: local Z position of group center
- sizeZ: height of the group
- worldZ: world Z position after transform
Removed all culling logic to see ALL groups rendering.
This will help identify which groups are positioned HIGH (floating shell).
User reports the shell is 'larger and floating above' the real cathedral,
so we need to find groups with unusually high Z positions.
Changed culling strategy based on observation:
- Previous: Hide groups with <100 verts when close
- New: Hide groups >200 units away when you're <300 units from WMO
The floating cathedral is likely Groups 281/283/284/285 which are:
- High detail (23k-28k verts)
- Far away (200-569 units from camera)
- Meant to show the cathedral from a distance
When you're actually near/inside the cathedral (distToWMO < 300),
these distant views should be hidden and only the close-up geometry
(Group 257 at 20 units) should render.
Added distance-based culling for WMO LOD shell groups:
- Skip groups with <100 vertices when camera is within 500 units
- This hides the simplified 'distant shell' when you're close to buildings
Analysis from STORMWIND.WMO logs revealed:
- LOD shell: Groups 268/269/271/274 (24-72 verts, flags 0x19xx)
- Main cathedral: Group 257 (32,698 verts at 20 units distance)
The LOD shell groups are meant for distant viewing only but were
rendering at all distances, causing the 'floating cathedral' effect.
Fix: Compute distance from camera to each group center and skip
rendering low-vertex groups when close. This preserves performance
(LOD shells still render from far away) while fixing the visual bug.
Added detailed logging when rendering STORMWIND.WMO groups to identify
the distant LOD shell that's causing the floating cathedral:
- Group index
- Group flags (hex) - will reveal which flag marks distant-only groups
- Distance from camera to group center
- Vertex count (helps identify simplified LOD geometry)
Logs once per session to avoid spam. This will help us identify:
1. Which groups are the floating LOD shell
2. What flag value indicates 'distant view only'
3. Proper distance threshold for LOD culling
Next step: Use flag pattern to hide distant groups when camera is close.
The issue was that vertex colors (MOCV) were being multiplied directly into
the texture color BEFORE lighting calculation. When MOCV data contained
black (0,0,0) values, this zeroed out the texture color, making all
subsequent lighting multiplication also zero, resulting in pitch black areas
regardless of ambient light settings.
Fixed by:
1. Removed premature vertex color multiplication from texture sampling
2. Applied vertex colors as ambient occlusion AFTER lighting calculation
3. Clamped vertex colors to minimum 0.5 to prevent complete blackout
Now even areas with black MOCV data will render at 50% brightness minimum,
while properly lit areas remain bright. This preserves the AO effect without
causing invisible geometry.
Added detailed logging for WMO vertex data to diagnose pitch black areas:
- Log MOCV (vertex colors) chunk presence and first color value
- Log MONR (normals) chunk presence and first normal vector
- Log WMO group flags to identify interior vs exterior groups
Increased WMO ambient light from (0.4, 0.4, 0.5) to (0.55, 0.55, 0.6) to
make shadowed/dark areas more visible. This addresses pitch black areas in
Stormwind and other locations where diffuse lighting may be insufficient.
The diagnostic output will help identify if black areas are caused by:
- Missing or incorrect vertex color data (MOCV)
- Missing or incorrect normal data (MONR)
- Groups incorrectly flagged as interior (0x2000 flag)
Removed both persistent grid cache and per-frame dedup cache. Even the
per-frame cache was causing issues when player Z changes between queries
in the same frame (multi-sampling), returning stale floor heights and
causing fall-through at stairs. Floor queries now always raycast fresh.
Disabled persistent WMO floor grid cache - it stored one height per
2-unit cell causing fall-through at stairs where floor height changes
within a cell. Per-frame dedup cache is sufficient for performance.
Added camera raycast collision against WMO walls (when inside) and M2
objects to zoom in when camera would clip through geometry instead of
phasing through walls.
Relaxed walkable slope threshold from 0.40 to 0.35 (~70° max) for
steeper stair climbing. Tightened WMO floor cache above-tolerance
back to 0.25 units to prevent cached stair landing from overriding
approach floor. Added M2 floor preference for ship decks to prevent
falling through to water below.
Changed walkable slope threshold from 0.45 (63°) to 0.40 (66°) in both
WMO and M2 collision to allow climbing steeper stairs (like 60° steps).
Increased WMO floor cache above-tolerance from 0.35 to 0.50 units to
prevent falling through floors in places like Booty Bay where cached
floor is slightly above query point.
When inside a WMO, use:
- Smaller sweep step size (0.20 vs 0.35) for more frequent collision checks
- Tighter player radius (0.45 vs 0.50) for less claustrophobic corridors
- Stronger push response (0.12 vs 0.08 max) for more responsive walls
Prevents clipping through walls in tight indoor spaces while keeping
outdoor movement smooth.
Cap WMO swept wall collision pushback to 0.15 units (was 0.55) so walls
stop the player without violent shoves. Fix M2 stepped fountain lateral
push using effectiveTop instead of rawMax.z so the near-top check matches
the stepped profile height at the player's radial position.
Remove active group fast path from getFloorHeight to fix bridge clipping.
Replace ground smoothing with immediate step-up snap (WoW-style: snap up,
smooth down). Accept upward Z from wall collision at all call sites. Skip
floor-like surfaces (absNz >= 0.45) in wall collision to prevent false
wall hits on ramps. Increase getFloorHeight allowAbove from 0.5 to 2.0
for ramp reacquisition. Prefer highest reachable surface in floor selection.
- Add mutex to AssetManager::loadTexture/loadDBC/fileExists to prevent
StormLib thread-safety races that silently fail texture reads; stop
caching texture load failures so transient errors are retried.
- Replace /unstuckgy DBC lookup (which used wrong coordinate transform)
with hardcoded safe locations per map.
- Widen WMO floor raycast from single grid cell to ±1 unit range query
to catch bridge/walkway triangles at cell boundaries.
- Tighten swept collision hit threshold (0.5 → 0.15) and grid query
margin (2.5 → 1.5) to prevent false-positive wall pushes.
- Tighten post-wall-push Z snap lower bound (-1.0 → -0.3) to prevent
gradual floor sinking.