Commit Graph

23 Commits

Author SHA1 Message Date
Kelsi
ce105ced9f Add unlit rendering for M2 glow/additive batches
Batches with the M2 unlit material flag (0x01) or additive blend modes
(3+) now skip lighting, shadows, and fog, emitting texture color directly.
Fixes lantern glow quads appearing as dull transparent circles.
2026-02-06 03:28:21 -08:00
Kelsi
ce4299fe51 Parse M2 render flags and apply per-batch blend modes
Water/lava batches in fountain and Ironforge M2 models use non-opaque
blend modes (alpha, additive) defined in the M2 material table. Without
parsing these, they rendered as solid surfaces extending visibly beyond
their containers. Now each batch looks up its blend mode from the
material array and sets the appropriate GL blend function.
2026-02-06 01:54:25 -08:00
Kelsi
b83ec336b6 Implement M2 texture animation (UV scrolling) for fountain water
Parse M2TextureTransform entries and texture transform lookups from the
M2 binary, then apply per-batch UV offsets in the vertex shader using
the existing animation time base and global sequence durations.
2026-02-06 01:49:27 -08:00
Kelsi
ab4cb878ea Improve shadow stability and reduce foliage pop-in 2026-02-04 16:30:24 -08:00
Kelsi
979c0b5592 Stabilize shadows and soften foliage shadow casting 2026-02-04 16:22:18 -08:00
Kelsi
aeccddddeb Add centralized anisotropic filtering, fog, and Blinn-Phong specular to all renderers
Anisotropic filtering now queries GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT once
and applies via a single applyAnisotropicFiltering() utility, replacing
hardcoded calls across all renderers. Fog (sky horizon color, 100-600
range) and Blinn-Phong specular highlights are added to WMO, M2, and
character shaders for visual parity with terrain. Shadow sampling
plumbing (sampler2DShadow with 3x3 PCF) is wired into all three shaders
gated by uShadowEnabled, ready for a future shadow map pass.
2026-02-04 15:05:46 -08:00
Kelsi
c9adcd3d96 Add smoke particle emitters with ember sparks and enable 4x MSAA
Replace UV scroll workaround for chimney smoke with proper GL_POINTS
particle system. Smoke particles rise, expand, drift, and fade over
4-7 seconds. One in eight particles spawns as a bright orange/red
ember spark. Enable 4x multisample antialiasing for smoother edges
on player models, fences, and foliage.
2026-02-04 14:37:32 -08:00
Kelsi
11a4958e84 Add M2 global sequence animation, smoke UV scroll, and fix WMO floor detection
- Parse global sequence durations from M2 binary and use them in bone
  interpolation so torches, candles, and other env doodads animate.
- Add UV scroll shader effect for smoke models (HouseSmoke, SmokeStack)
  as a workaround for unimplemented M2 particle emitters.
- Tighten WMO floor probe heights to prevent multi-story buildings from
  returning the wrong floor, fixing player clipping through inn floors
  and camera locking onto the second floor.
- Use player ground level as reference for camera orbit floor collision
  so the camera doesn't fight upper floors in buildings.
2026-02-04 14:06:59 -08:00
Kelsi
6ca9e9024a Add loading screen, fix tree/foliage collision, jump buffering, and fence rotation
- Loading screen stays visible until all terrain tiles finish streaming;
  character spawns only after terrain is loaded and Z-snapped to ground
- Reduce tree trunk collision bounds (5% of canopy, capped at 5.0) and
  make all small/medium trees, bushes, lily pads, and foliage walkthrough
- Add jump input buffering (150ms) and coyote time (100ms) for responsive jumps
- Fix fence orientation by adding +180° heading rotation
- Increase terrain load radius from 1 to 2 (5x5 tile grid)
- Add hearthstone callback for single-player camera reset
2026-02-04 13:29:27 -08:00
Kelsi
f7cd871895 Add M2 idle animation variations, dedup instances, fix terrain textures
- Add idle variation system: creatures randomly play Stand variations
  (stretch, flap, look around) every 4-10s, then return to idle loop
- Deduplicate M2 instances at same position (was hidden before animation
  made duplicates visible with different random start times)
- Adaptive M2 render distance: 350 units in open terrain, 180 in cities
- Restore terrain sampler-to-unit uniform bindings lost during texture
  bind optimization (roads were invisible under grass)
- Safety: clamp bone count to 128, validate sequence indices, sanitize scale
2026-02-04 11:50:18 -08:00
Kelsi
15fa055726 Add M2 skeletal animation and fix terrain texture layers
- Implement GPU bone skinning for M2 doodads/creatures (gryphons, birds)
- Store bone hierarchy and animation keyframes per model
- Compute bone matrices per-instance with keyframe interpolation
- Upload bone weights/indices in vertex buffer, skinning in vertex shader
- Fix terrain texture rendering: restore sampler-to-unit uniform bindings
  removed during texture bind optimization (roads were invisible)
2026-02-04 11:40:00 -08:00
Kelsi
4bc5064515 Add spellbook, fix WMO floor clipping, and polish UI/visuals
- Add spellbook screen (P key) with Spell.dbc name lookup and action bar assignment
- Default Attack and Hearthstone spells available in single player
- Fix WMO floor clipping (gryphon roost) by tightening ceiling rejection threshold
- Darken ocean water, increase wave motion and opacity
- Add M2 model distance fade-in to prevent pop-in
- Reposition chat window, add slash/enter key focus
- Remove debug key commands (keep only F1 perf HUD, N minimap)
- Performance: return chat history by const ref, use deque for O(1) pop_front
2026-02-04 11:31:08 -08:00
Kelsi
871172d63e Tune collision behavior for ramps, props, and structural walls 2026-02-03 19:10:22 -08:00
Kelsi
f00d13bfc0 Improve performance and tune ramp/planter collision behavior 2026-02-03 17:21:04 -08:00
Kelsi
f43e6bf834 Tune planter curb collision and reduce foliage pushback 2026-02-03 16:51:25 -08:00
Kelsi
75046afe47 Add stepped fountain collision for parkour-style climbing 2026-02-03 16:28:33 -08:00
Kelsi
baca09828e Optimize collision queries with spatial grid and improve movement CCD 2026-02-03 16:21:48 -08:00
Kelsi
a3f351f395 Fix camera occlusion and stabilize WMO/M2 collision behavior 2026-02-03 16:04:21 -08:00
Kelsi
d03ff5ee4c Tune collision feel and align M2 movement/camera behavior 2026-02-03 15:17:54 -08:00
Kelsi
a8cf17e7e5 Improve rendering distances, camera collision, and spawn point
- Increase WMO render distance from 1500 to 3000 units for better city loading
- Increase M2 render distance from 500 to 1000 units
- Increase terrain load radius from 4 to 6 tiles (~3200 units)
- Add raycast-based camera collision that zooms in when obstructed by walls/objects
- Move spawn point outside chapel to road near Stormwind gate
- Add ground height smoothing to prevent stumbling on uneven terrain
2026-02-02 23:18:34 -08:00
Kelsi
76a16a214e Improve movement, crouching, and add M2 animation
Movement:
- Fix speed controls: Shift=sprint (28), normal run (14), Ctrl=walk (5)
- Reduce character height for doorway clearance (eye height 1.2)
- Add working crouch (C or X key) with smooth transition (eye height 0.6)
- Jump to stand up from crouch

M2 Animation:
- Add animation time tracking per M2 instance
- Add procedural swaying animation in vertex shader
- Update animation each frame for vegetation movement
2026-02-02 23:10:19 -08:00
Kelsi
4287878a73 Performance optimizations and collision improvements
Performance:
- Remove expensive inverse() from all vertex shaders (terrain, WMO, M2, water, character)
- Add uniform location caching to avoid repeated glGetUniformLocation calls
- Add proper frustum culling for WMO groups using AABB intersection
- Add distance-based culling for WMO and M2 instances
- Add cleanup of unused M2/WMO models when tiles unload

Collision & Movement:
- Add M2 doodad collision detection (fences, boxes, etc.)
- Reduce character eye height (5.0 -> 1.8) and collision radius (2.5 -> 0.5)
- Enable WoW-style movement speed by default (14 units/sec run, 5 walk, 9 back)
- Fix emote grammar ("You waves." -> "You wave.")

Misc:
- Rename window title to "Wowee"
2026-02-02 23:03:45 -08:00
Kelsi
ce6cb8f38e Initial commit: wowee native WoW 3.3.5a client 2026-02-02 13:03:22 -08:00