Kelsidavis-WoWee/assets/shaders
Paul d54e262048 feat(rendering): GPU architecture + visual quality fixes
M2 GPU instancing
- M2InstanceGPU SSBO (96 B/entry, double-buffered, 16384 max)
- Group opaque instances by (modelId, LOD); single vkCmdDrawIndexed per group
- boneBase field indexes into mega bone SSBO via gl_InstanceIndex

Indirect terrain drawing
- 24 MB mega index buffer (6M uint32) + 64 MB mega vertex buffer
- CPU builds VkDrawIndexedIndirectCommand per visible chunk
- Single VB/IB bind per frame; shadow pass reuses mega buffers
- Replaced vkCmdDrawIndexedIndirect with direct vkCmdDrawIndexed to fix
  host-mapped buffer race condition that caused terrain flickering

GPU frustum culling (compute shader)
- m2_cull.comp.glsl: 64-thread workgroups, sphere-vs-6-planes + distance cull
- CullInstanceGPU SSBO input, uint visibility[] output, double-buffered
- dispatchCullCompute() runs before main pass via render graph node

Consolidated bone matrix SSBOs
- 16 MB double-buffered mega bone SSBO (2048 instances × 128 bones)
- Eliminated per-instance descriptor sets; one megaBoneSet_ per frame
- prepareRender() packs bone matrices consecutively into current frame slot

Render graph / frame graph
- RenderGraph: RGResource handles, RGPass nodes, Kahn topological sort
- Automatic VkImageMemoryBarrier/VkBufferMemoryBarrier between passes
- Passes: minimap_composite, worldmap_composite, preview_composite,
  shadow_pass, reflection_pass, compute_cull
- beginFrame() uses buildFrameGraph() + renderGraph_->execute(cmd)

Pipeline derivatives
- PipelineBuilder::setFlags/setBasePipeline for VK_PIPELINE_CREATE_DERIVATIVE_BIT
- M2 opaque = base; alphaTest/alpha/additive are derivatives
- Applied to terrain (wireframe) and WMO (alpha-test) renderers

Rendering bug fixes:
- fix(shadow): compute lightSpaceMatrix before updatePerFrameUBO to eliminate
  one-frame lag that caused shadow trails and flicker on moving objects
- fix(shadow): scale depth bias with shadowDistance_ instead of hardcoded 0.8f
  to prevent acne at close range and gaps at far range
- fix(visibility): WMO group distance threshold 500u → 1200u to match terrain
  view distance; buildings were disappearing on the horizon
- fix(precision): camera near plane 0.05 → 0.5 (ratio 600K:1 → 60K:1),
  eliminating Z-fighting and improving frustum plane extraction stability
- fix(streaming): terrain load radius 4 → 6 tiles (~2133u → ~3200u) to exceed
  M2 render distance (2800u) and eliminate pop-in when camera turns;
  unload radius 7 → 9; spawn radius 3 → 4
- fix(visibility): ground-detail M2 distance multiplier 0.75 → 0.9 to reduce
  early pop of grass and debris
2026-04-04 13:43:16 +03:00
..
basic.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
basic.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
basic.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
basic.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
celestial.frag.glsl Fix sun quad square artifact with hard radial discard cutoff 2026-02-23 08:43:50 -08:00
celestial.frag.spv Fix sun quad square artifact with hard radial discard cutoff 2026-02-23 08:43:50 -08:00
celestial.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
celestial.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
character.frag.glsl fix(rendering): alpha-to-coverage for hair, skip eye glow geosets, add missing include 2026-04-04 00:21:15 -07:00
character.frag.spv fix(rendering): alpha-to-coverage for hair, skip eye glow geosets, add missing include 2026-04-04 00:21:15 -07:00
character.vert.glsl Add normal mapping and parallax occlusion mapping for character models 2026-02-23 01:40:23 -08:00
character.vert.spv Add normal mapping and parallax occlusion mapping for character models 2026-02-23 01:40:23 -08:00
character_shadow.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
character_shadow.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
character_shadow.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
character_shadow.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
charge_dust.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
charge_dust.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
charge_dust.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
charge_dust.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
charge_ribbon.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
charge_ribbon.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
charge_ribbon.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
charge_ribbon.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
clouds.frag.glsl Enhanced sky atmosphere with DBC-driven colors, sun lighting, and zone weather 2026-02-22 23:20:13 -08:00
clouds.frag.spv Enhanced sky atmosphere with DBC-driven colors, sun lighting, and zone weather 2026-02-22 23:20:13 -08:00
clouds.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
clouds.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
fsr2_accumulate.comp.glsl Stabilize FSR2 path and refine temporal pipeline groundwork 2026-03-08 18:52:04 -07:00
fsr2_accumulate.comp.spv Stabilize FSR2 path and refine temporal pipeline groundwork 2026-03-08 18:52:04 -07:00
fsr2_motion.comp.glsl Stabilize FSR2 path and refine temporal pipeline groundwork 2026-03-08 18:52:04 -07:00
fsr2_motion.comp.spv FSR2: selective clamp, tonemapped accumulation, terrain load radius 3 2026-03-08 15:15:44 -07:00
fsr2_sharpen.frag.glsl fix: remove Y-flip counter-hacks in FSR shaders; invert mouse by default; FSR1 disables MSAA 2026-03-12 21:59:41 -07:00
fsr2_sharpen.frag.spv fix: remove Y-flip counter-hacks in FSR shaders; invert mouse by default; FSR1 disables MSAA 2026-03-12 21:59:41 -07:00
fsr_easu.frag.glsl fix: remove Y-flip counter-hacks in FSR shaders; invert mouse by default; FSR1 disables MSAA 2026-03-12 21:59:41 -07:00
fsr_easu.frag.spv fix: remove Y-flip counter-hacks in FSR shaders; invert mouse by default; FSR1 disables MSAA 2026-03-12 21:59:41 -07:00
fsr_rcas.frag.glsl Fix WMO wall collision, normal mapping, POM backfill, and M2/WMO rendering performance 2026-03-07 22:03:28 -08:00
fsr_rcas.frag.spv Fix WMO wall collision, normal mapping, POM backfill, and M2/WMO rendering performance 2026-03-07 22:03:28 -08:00
fxaa.frag.glsl feat: add ghost mode grayscale screen effect 2026-03-13 00:59:36 -07:00
fxaa.frag.spv feat: add ghost mode grayscale screen effect 2026-03-13 00:59:36 -07:00
lens_flare.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
lens_flare.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
lens_flare.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
lens_flare.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
lightning_bolt.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
lightning_bolt.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
lightning_bolt.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
lightning_bolt.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
lightning_flash.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
lightning_flash.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
lightning_flash.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
lightning_flash.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
m2.frag.glsl Fix glow sprite flashing, move fadeAlpha to push constants, throttle character bones 2026-03-04 08:17:32 -08:00
m2.frag.spv Fix glow sprite flashing, move fadeAlpha to push constants, throttle character bones 2026-03-04 08:17:32 -08:00
m2.vert.glsl feat(rendering): GPU architecture + visual quality fixes 2026-04-04 13:43:16 +03:00
m2.vert.spv feat(rendering): GPU architecture + visual quality fixes 2026-04-04 13:43:16 +03:00
m2_cull.comp.glsl feat(rendering): GPU architecture + visual quality fixes 2026-04-04 13:43:16 +03:00
m2_cull.comp.spv feat(rendering): GPU architecture + visual quality fixes 2026-04-04 13:43:16 +03:00
m2_particle.frag.glsl fix(render): premultiply glow sprite color by alpha 2026-03-14 06:10:20 -07:00
m2_particle.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
m2_particle.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
m2_particle.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
m2_ribbon.frag.glsl feat: implement M2 ribbon emitter rendering for spell trail effects 2026-03-13 01:17:30 -07:00
m2_ribbon.frag.spv feat: implement M2 ribbon emitter rendering for spell trail effects 2026-03-13 01:17:30 -07:00
m2_ribbon.vert.glsl feat: implement M2 ribbon emitter rendering for spell trail effects 2026-03-13 01:17:30 -07:00
m2_ribbon.vert.spv feat: implement M2 ribbon emitter rendering for spell trail effects 2026-03-13 01:17:30 -07:00
m2_smoke.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
m2_smoke.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
m2_smoke.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
m2_smoke.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
minimap_display.frag.glsl fix: correct minimap orientation and arrow direction, compact key ring UI 2026-03-17 08:18:46 -07:00
minimap_display.frag.spv fix: correct minimap orientation and arrow direction, compact key ring UI 2026-03-17 08:18:46 -07:00
minimap_display.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
minimap_display.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
minimap_tile.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
minimap_tile.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
minimap_tile.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
minimap_tile.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
mount_dust.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
mount_dust.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
mount_dust.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
mount_dust.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
overlay.frag.glsl Activate WMO/char/M2 render loop, purge dead GL block, add underwater overlay 2026-02-21 22:04:17 -08:00
overlay.frag.spv Activate WMO/char/M2 render loop, purge dead GL block, add underwater overlay 2026-02-21 22:04:17 -08:00
postprocess.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
postprocess.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
postprocess.vert.glsl fix: remove incorrect Y-flip in postprocess vertex shader 2026-03-12 21:52:00 -07:00
postprocess.vert.spv fix: remove incorrect Y-flip in postprocess vertex shader 2026-03-12 21:52:00 -07:00
quest_marker.frag.glsl feat: desaturate quest markers for trivial (gray) quests 2026-03-10 22:26:56 -07:00
quest_marker.frag.spv feat: desaturate quest markers for trivial (gray) quests 2026-03-10 22:26:56 -07:00
quest_marker.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
quest_marker.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
selection_circle.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
selection_circle.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
selection_circle.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
selection_circle.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
shadow.frag.glsl Add shader-driven tree beautification: wind sway, SSS, color variation, AO 2026-02-23 03:53:50 -08:00
shadow.frag.spv Add shader-driven tree beautification: wind sway, SSS, color variation, AO 2026-02-23 03:53:50 -08:00
shadow.vert.glsl Add shader-driven tree beautification: wind sway, SSS, color variation, AO 2026-02-23 03:53:50 -08:00
shadow.vert.spv Add shader-driven tree beautification: wind sway, SSS, color variation, AO 2026-02-23 03:53:50 -08:00
skybox.frag.glsl Enhanced sky atmosphere with DBC-driven colors, sun lighting, and zone weather 2026-02-22 23:20:13 -08:00
skybox.frag.spv Enhanced sky atmosphere with DBC-driven colors, sun lighting, and zone weather 2026-02-22 23:20:13 -08:00
skybox.vert.glsl Fix sky and clouds orientation for Z-up world coordinates 2026-02-21 22:04:17 -08:00
skybox.vert.spv Fix sky and clouds orientation for Z-up world coordinates 2026-02-21 22:04:17 -08:00
starfield.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
starfield.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
starfield.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
starfield.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
swim_bubble.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
swim_bubble.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
swim_bubble.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
swim_bubble.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
swim_insect.frag.glsl Add ambient insect particles near water vegetation, fix firefly particles, and improve water foam 2026-02-23 07:18:44 -08:00
swim_insect.frag.spv Add ambient insect particles near water vegetation, fix firefly particles, and improve water foam 2026-02-23 07:18:44 -08:00
swim_ripple.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
swim_ripple.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
swim_ripple.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
swim_ripple.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
terrain.frag.glsl Distance-cull terrain derivative normal mapping 2026-02-23 10:54:56 -08:00
terrain.frag.spv Distance-cull terrain derivative normal mapping 2026-02-23 10:54:56 -08:00
terrain.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
terrain.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
water.frag.glsl chore: remove dead code, document water shader wave parameters 2026-03-30 18:50:14 -07:00
water.frag.spv Ironforge Great Forge lava, magma water rendering, LavaSteam particle effects 2026-03-07 00:48:04 -08:00
water.vert.glsl Add player water ripples and separate 1x water pass for MSAA compatibility 2026-02-22 22:34:48 -08:00
water.vert.spv Add player water ripples and separate 1x water pass for MSAA compatibility 2026-02-22 22:34:48 -08:00
weather.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
weather.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
weather.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
weather.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
wmo.frag.glsl wmo: apply MOHD ambient color to interior group lighting 2026-03-09 21:27:01 -07:00
wmo.frag.spv wmo: apply MOHD ambient color to interior group lighting 2026-03-09 21:27:01 -07:00
wmo.vert.glsl Add normal mapping and parallax occlusion mapping for WMO surfaces 2026-02-23 01:10:58 -08:00
wmo.vert.spv Add normal mapping and parallax occlusion mapping for WMO surfaces 2026-02-23 01:10:58 -08:00
wmo_occlusion.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
wmo_occlusion.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
wmo_occlusion.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
wmo_occlusion.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
world_map.frag.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
world_map.frag.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00
world_map.vert.glsl Vulcan Nightmare 2026-02-21 22:04:17 -08:00
world_map.vert.spv Vulcan Nightmare 2026-02-21 22:04:17 -08:00