Commit graph

827 commits

Author SHA1 Message Date
Kelsi
9c8cd44803 Optimize threading and texture fallback stability 2026-02-22 08:12:08 -08:00
Kelsi
f4d947fab1 Make frame timing logs opt-in 2026-02-22 07:45:49 -08:00
Kelsi
6d55c19987 Stabilize net parsing and reduce texture-cache churn 2026-02-22 07:44:32 -08:00
Kelsi
ae88b226b5 Stabilize streaming memory and parser handling; revert socket recv optimizations 2026-02-22 07:26:54 -08:00
Kelsi
c914295d20 Reduce logging overhead and reuse WMO culling futures 2026-02-22 06:42:15 -08:00
Kelsi
4ea4cb761c Optimize logging and make world packet parser callback-safe 2026-02-22 06:38:41 -08:00
Kelsi
85c8b5d5f4 Optimize logging overhead and character animation threading 2026-02-22 06:32:49 -08:00
Kelsi
9d647e5622 Fix Vulkan shadow shader descriptor set mismatch 2026-02-22 06:28:18 -08:00
Kelsi
57b049fb2a Fix character disappearance from transient Vulkan resource lifetime 2026-02-22 06:21:18 -08:00
Kelsi
7dd1dada5f Work on character rendering and frustrum culling etc 2026-02-22 05:58:45 -08:00
Kelsi
fc5294eb0f Update readme and build instructions docs 2026-02-22 05:09:16 -08:00
Kelsi
e8e859384e Fix minimap MSAA pipeline, defer swapchain recreation, fix player character spawn order
- Add .setMultisample() to minimap display pipeline and recreatePipelines() for MSAA changes
- Defer all swapchain recreation in window.cpp to beginFrame() via markSwapchainDirty()
  to prevent mid-frame render pass destruction crashes on resolution/fullscreen change
- Move spawnPlayerCharacter() call to after loadTestTerrain() where character renderer exists
2026-02-22 03:49:44 -08:00
Kelsi
ebd0084c22 Fix MSAA crash by deferring change to between frames, fix M2 GO orientation
MSAA change was called mid-frame from settings UI, destroying the render pass
and framebuffers while the command buffer was still recording. Now deferred
via pendingMsaaSamples_ flag, applied in beginFrame() before any GPU state.

Also add +180° to M2 game object orientation to fix facing direction.
2026-02-22 03:37:47 -08:00
Kelsi
325254dfcb Port UI icon textures from OpenGL to Vulkan, fix loading screen clear values
Replace all glGenTextures/glTexImage2D calls in UI code with Vulkan texture
uploads via new VkContext::uploadImGuiTexture() helper. This fixes segfaults
from calling OpenGL functions without a GL context (null GLEW function pointers).

- Add uploadImGuiTexture() to VkContext with staging buffer upload pattern
- Convert game_screen, inventory_screen, spellbook_screen, talent_screen
  from GLuint/GL calls to VkDescriptorSet/Vulkan uploads
- Fix loading_screen clearValueCount (was 1, needs 2 or 3 for MSAA)
2026-02-22 03:32:08 -08:00
Kelsi
b1a9d231c7 Fix MSAA 8x crash: clearValueCount must match attachment count
Render pass begin used 2 clear values but MSAA render pass has 3
attachments (MSAA color, depth, resolve). Vulkan requires clear
value count >= attachment count, causing a driver crash at 8x.

Also fix renderYawM2 reference removed in previous commit.
2026-02-22 03:11:21 -08:00
Kelsi
786b35ae0d Remove +90° rotation from M2 game object orientation
M2 game objects don't need the extra 90° yaw offset that was
previously applied — orientation from server is used directly.
2026-02-22 03:07:33 -08:00
Kelsi
fa1867cf2f Fix MSAA 8x crash and eliminate redundant GPU stalls
- 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)
2026-02-22 03:05:55 -08:00
Kelsi
e12141a673 Add configurable MSAA anti-aliasing, update auth screen and terrain shader
- MSAA: conditional 2-att (off) vs 3-att (on) render pass with auto-resolve
- MSAA: multisampled color+depth images, query max supported sample count
- MSAA: .setMultisample() on all 25+ main-pass pipelines across 17 renderers
- MSAA: recreatePipelines() on every sub-renderer for runtime MSAA changes
- MSAA: Renderer::setMsaaSamples() orchestrates swapchain+pipeline+ImGui rebuild
- MSAA: Anti-Aliasing combo (Off/2x/4x/8x) in Video settings, persisted
- Update auth screen assets and terrain fragment shader
2026-02-22 02:59:24 -08:00
Kelsi
6d213ad49b Fix M2 game object orientation to use +90° render yaw like characters
M2 game objects (signs, posts) were using orientation - 90° while
characters/NPCs use orientation + 90° for the canonical-to-render yaw
conversion. Both renderers build model matrices identically, so they
need the same offset. The old -90° was calibrated when terrain was
rotated 90°; with correct terrain the signs appeared sideways.
2026-02-22 02:31:16 -08:00
Kelsi
25bd05a631 Add Discord badge to README 2026-02-21 22:09:52 -08:00
Kelsi
b012906887 Add Vulkan Y-flip to projection matrix and ignore node_modules
Negate projection[1][1] to correct for Vulkan's Y-down NDC convention.
Also add node_modules/ to .gitignore to prevent accidental commits.
2026-02-21 22:05:11 -08:00
Kelsi
4fc3689dcc Fix sky and clouds orientation for Z-up world coordinates
Skybox: replace sphere-mesh approach with a fullscreen triangle that
reconstructs the world-space ray direction analytically via inverse
projection/view matrices. Eliminates clip.w=0 degeneracy at the horizon
and correctly maps altitude to dir.z in the Z-up coordinate system.

Clouds: hemisphere mesh was storing altitude in aPos.y (Y-up convention);
the Z-up view matrix projected this sideways, making clouds appear
vertical. Store altitude in aPos.z and update the fragment shader to
read dir.z as altitude and dir.xy as the horizontal UV plane.
2026-02-21 22:04:17 -08:00
Kelsi
69cf39ba02 Activate WMO/char/M2 render loop, purge dead GL block, add underwater overlay
- renderWorld() now calls wmoRenderer, characterRenderer, m2Renderer (+smoke,
  particles) in the correct opaque→transparent order; water moved after all
  opaques; per-subsystem timing active in live path
- Deleted the 310-line #if 0 GL stub block and removed #include <GL/glew.h>
  (last GL reference in renderer.cpp)
- Full-screen overlay pipeline (postprocess.vert + overlay.frag, alpha blend,
  no depth test/write) for underwater tint; lazily initialized, renders a blue
  tint when camera is meaningfully below the water surface; canal vs open-water
  tint colours preserved from original design
- overlay.frag.glsl / overlay.frag.spv added
2026-02-21 22:04:17 -08:00
Kelsi
dea52744a4 Character renderer is fully Vulkan. 2026-02-21 22:04:17 -08:00
Kelsi
83b576e8d9 Vulcan Nightmare
Experimentally bringing up vulcan support
2026-02-21 22:04:17 -08:00
Kelsi
863a786c48 Merge remote-tracking branch 'origin/master' 2026-02-21 22:01:32 -08:00
Kelsi
cfac229fed Include code of conduct 2026-02-21 21:58:07 -08:00
Kelsi Rae Davis
12597294d9 Merge pull request #2 from VPeruS/docker-build
[build] Added configuration to allow building in container
2026-02-21 07:32:56 -08:00
vperus
95f5321833 [build] Added configuration to allow building in container 2026-02-21 17:04:56 +02:00
Kelsi Rae Davis
2d010ffe1a Merge pull request #3 from rursache/fix/extract-mpq-case-check
Fix MPQ detection failing when files are lowercase .mpq
2026-02-21 05:09:52 -08:00
Radu Ursache
ca852345a1 Fix MPQ detection failing when files are lowercase .mpq
The sanity check `ls *.MPQ *.mpq` fails under `set -o pipefail`
when only one case variant exists, because ls exits non-zero for
the unmatched glob pattern and pipefail propagates that failure.

Use `compgen -G` to check each glob pattern independently instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 15:02:07 +02:00
Kelsi
21f7b0f199 Remove nearest-known displayId model fallback cache for missing creature display mappings - that was weird and I'm done with the horror show 2026-02-21 04:18:14 -08:00
Kelsi
fa3060bdf7 Harden runtime against stutter-inducing log floods and missing display IDs
- Re-gate M2 glow diagnostics behind WOWEE_M2_GLOW_DIAG and DEBUG

- Deduplicate missing/failed texture warnings in asset and M2 texture loaders

- Deduplicate unhandled opcode warnings by state/opcode key in non-IN_WORLD phases

- Throttle malformed spline point-count warnings across world/classic/tbc parsers

- Ignore suspiciously huge display IDs from malformed packets with throttled warning

- Add nearest-known displayId model fallback cache for missing creature display mappings

- Clear display fallback caches on expansion reload and logout
2026-02-21 04:05:53 -08:00
Kelsi
dc91b316ed Refine lantern glow-card replacement and preserve lamp geometry
- Add per-batch glow metadata (lantern hint, card-like classification, tint)

- Track normalized texture keys and log lantern/light texture sets once for diagnostics

- Force sprite replacement for known Stormwind/Night Elf glow textures

- Keep lantern/light meshes visible while hiding only classified glow-card submeshes

- Choose glow sprite tint from texture hints (cool/red/warm) to avoid orange-only cards

- Broaden lantern glow detection to handle gameobject lights with nonstandard material setups
2026-02-21 03:51:42 -08:00
Kelsi
d40cfcad90 Reduce Stormwind stutter from spawn retry churn and log I/O
- Cache non-renderable creature display IDs and fail-fast future spawn attempts

- Mark GUIDs tied to non-renderable displays as permanent failures to avoid long retry loops

- Skip queued spawn retry work immediately for known non-renderable display IDs

- Clear non-renderable display cache on expansion reload/logout

- Downgrade high-volume UNIT spawn logs to debug and fix mislabeled time-sync log
2026-02-21 03:29:13 -08:00
Kelsi
f8fc34ff2c Narrow glow-card replacement to preserve lamp/sconce textures
- restrict glow sprite substitution to elven-like light models only
- keep Stormwind lamps and generic torch sconces rendering authored glass/grate/flame cards
- remove over-broad flame heuristic that turned many light fixtures into plain glow orbs
2026-02-21 03:26:21 -08:00
Kelsi
7a4a21c8bf Align lens flare with sky-locked sun rendering
- anchor flare sun position to camera + sun direction to match celestial billboard projection
- remove world-space parallax drift that caused flare/sun misalignment while moving
2026-02-21 03:23:24 -08:00
Kelsi
8156942b66 Align sun placement and shadow direction to active lighting
- drive shadow light direction from live LightingManager directionalDir
- normalize shadow light to downward-facing convention with grazing-angle guard
- make celestial/sky sun placement robust to directionalDir convention mismatches
- keep visible sun above horizon while preserving shadow alignment
2026-02-21 03:21:08 -08:00
Kelsi
566e7138f3 Refine sun rendering: remove white washout, add subtle atmospheric turbulence
- render sun with alpha blend while keeping moon additive glow
- add dedicated always-running sun haze timer (decoupled from moon phase cycling)
- constrain sun sprite with radial alpha mask and low-alpha discard to remove square artifact
- tune sun tint warmer without over-yellowing
- replace noisy/pulsing haze with slower flow-warp turbulence and lower amplitude
2026-02-21 03:10:45 -08:00
Kelsi
19759d506a Soften and grain cloud silhouettes against skybox
- make cloud mask transition broader for less distinct cutout edges
- increase high-frequency noise contribution for grainier cloud breakup
- apply edge-band fringe modulation with stronger feathering
- lower and remap final alpha to blend cloud boundaries more naturally into the sky
2026-02-21 02:58:57 -08:00
Kelsi
4f40a0287c Skip additive FX batches on attached weapon models
- filter blendMode >= 3 batches when rendering weapon attachments
- avoids detached flat card artifacts on certain swords while keeping core weapon geometry
2026-02-21 02:52:31 -08:00
Kelsi
e81ed3d91b Hide target selection circle for gameobjects
- gate selection-circle rendering to UNIT and PLAYER targets only
- clear selection circle for non-unit target types (including gameobjects)
- keep target position updates unchanged for facing/interaction logic
2026-02-21 02:52:05 -08:00
Kelsi
9da875c8ba Fix elven lantern glow cards rendering as flat disks
- route small lantern/lamp/torch/candle emissive batches to glow-sprite path
- broaden light-emitter detection beyond additive-only blend modes
- add a secondary wider low-alpha halo layer for softer glow falloff
- keep elven-style lantern tint in cool blue while preserving warm tint elsewhere

This avoids rendering hard flat glow planes and restores a softer volumetric-looking lantern glow.
2026-02-21 02:49:26 -08:00
Kelsi
b2b196aa33 Reduce creature spawn stutter from repeated missing-display logging
- add one-time warning caches for missing CreatureDisplayInfo and missing model path lookups
- log each missing displayId/model-path only once instead of every spawn retry/frame
- remove duplicate empty-model-path warning in spawnOnlineCreature (already reported by lookup path)

This cuts high-frequency log I/O and string formatting in hotspots when server sends unknown displayIds, while preserving first-occurrence diagnostics.
2026-02-21 02:43:06 -08:00
Kelsi
0c8798d6b5 Improve player and foliage shadow quality and stability
- 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
2026-02-21 02:28:47 -08:00
Kelsi
7717ab8d6b Stabilize foliage shadows and smooth motion transitions
- 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%
2026-02-21 02:23:08 -08:00
Kelsi
1003b25ff4 Improve runtime stutter handling and ground clutter performance
- reduce per-tile ground clutter generation pressure and enforce tighter caps to avoid spikes

- remove expensive detail dedupe scans from the hot render path

- add progressive/lazy clutter updates around player movement to smooth frame pacing

- lower noisy runtime INFO logging to DEBUG/throttled paths

- keep terrain/game screen updates responsive while preserving existing behavior
2026-02-21 01:26:16 -08:00
Kelsi
c04e97e375 Fix street sign interaction text and M2 sign orientation
Add page-text support for sign-like gameobject interactions by handling SMSG_GAMEOBJECT_PAGETEXT and SMSG_PAGE_TEXT_QUERY_RESPONSE, and issuing CMSG_PAGE_TEXT_QUERY when page IDs are available from cached GO template data.

Normalize received page text tokens before chat display and add a fallback for basic signpost GO type clicks to print sign names when no page data is present.

Correct M2 gameobject yaw alignment for signposts/arrows by applying render-space -90deg offset consistently across spawn, position update, and move-callback transforms; keep WMO orientation path unchanged.
2026-02-20 23:31:30 -08:00
Kelsi
ace24e8ccc Fix quest accept/abandon flow and expansion-specific accept packet format
Normalize WoW quest text tokens during parsing so quest titles/details no longer leak raw markup like  and |n into UI. Apply to WotLK and Classic parser paths, including quest list parsing in GameHandler.

Harden quest state handling by mapping abandon requests to authoritative server quest-log slots (PLAYER_QUEST_LOG_START) instead of local vector order, with a guarded fallback when update fields are unavailable.

Improve accept de-duplication by trusting server slot state over stale local cache; allow re-accept when local/server state diverges and trigger resync semantics.

Add expansion-aware CMSG_QUESTGIVER_ACCEPT_QUEST builders: WotLK sends guid+questId+unk1(uint32), while TBC/Classic/Turtle send guid+questId only. Wire GameHandler through PacketParsers for compatibility across expansions and cores.
2026-02-20 23:20:02 -08:00
Kelsi
73273a6ab5 Refine NPC virtual weapon and facial-hair resolution
- prioritize AzerothCore-compatible virtual item base indices (including 56) for NPC held weapons\n- resolve UNIT_VIRTUAL_ITEM_SLOT values strictly via Item.dbc entry -> DisplayID to avoid display-ID collisions\n- keep NPC offhand detached in this path to prevent erroneous shields/hilts\n- tighten facial geoset filtering to selected variants with minimal fallback (1xx/2xx/3xx)\n- reduce beard/sideburn overdraw while preserving selected chin/mustache channel
2026-02-20 23:09:56 -08:00