Commit Graph

32 Commits

Author SHA1 Message Date
587c75f6c2 feat(editor): integrate asset browser into editor_demo
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:38:11 +09:00
b965d78835 feat(editor): integrate hierarchy and inspector panels into editor_demo
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:59:55 +09:00
14fe532432 feat(editor): integrate 3D viewport into editor_demo
Render actual 3D geometry (cubes + ground plane) in the Viewport panel
using the existing mesh_shader.wgsl Blinn-Phong pipeline with orbit
camera controls (left-drag to orbit, middle-drag to pan, scroll to zoom).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:40:41 +09:00
f7ef228b49 feat(editor): integrate docking into editor_demo
Add full-frame-cycle integration test to dock.rs (16 tests total) and
update editor_demo to use DockTree layout instead of a single panel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 10:09:53 +09:00
1081fb472f feat(renderer): improve IBL with Hosek-Wilkie sky, SH irradiance, GPU BRDF LUT
- Hosek-Wilkie inspired procedural sky (Rayleigh/Mie scattering, sun disk)
- L2 Spherical Harmonics irradiance (9 coefficients, CPU computation)
- SH evaluation in shader replaces sample_environment for diffuse IBL
- GPU compute BRDF LUT (Rg16Float, higher precision than CPU Rgba8Unorm)
- SkyParams (sun_direction, turbidity) in ShadowUniform

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:58:28 +09:00
6bc77cb777 feat(renderer): add ORM and emissive texture map support to PBR pipeline
- Extended bind group 1: albedo + normal + ORM + emissive (8 bindings)
- pbr_shader.wgsl: ORM sampling (R=AO, G=roughness, B=metallic) + emissive
- deferred_gbuffer.wgsl: ORM + emissive luminance in material_data.w
- deferred_lighting.wgsl: emissive contribution from G-Buffer
- All 5 PBR examples updated with default ORM/emissive textures
- Backward compatible: old 4-binding layout preserved

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 20:41:30 +09:00
63d5ae2c25 feat(game): add HUD, audio SFX, and game over/restart
Add IMGUI HUD overlay showing HP, wave, score, and enemy count.
Display centered Game Over panel with final score and restart prompt.
Add procedural sine-wave audio clips for shooting (440Hz) and enemy
kills (220Hz) via voltex_audio. Player blinks white during invincibility.
Press R to restart after game over.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:46:41 +09:00
d17732fcd5 feat(game): add collision detection, damage, and scoring
Projectiles destroy enemies on contact (radius check 0.55). Enemies
damage the player on contact with 1s invincibility window. Score +100
per kill. Game over when HP reaches 0. update() now returns FrameEvents
so the caller can trigger audio/visual feedback.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:46:34 +09:00
a7cd14f413 feat(game): add enemy spawning with wave system and chase AI
Red sphere enemies spawn at arena edges via a wave system that
escalates each round. Enemies use direct seek steering to chase
the player. Both shadow and color passes render enemies.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:41:34 +09:00
5496525a7f feat(game): add projectile shooting toward mouse aim
Left click fires small yellow sphere projectiles from the player toward
the mouse cursor position on the XZ plane. Includes fire cooldown (0.2s),
projectile lifetime (2.0s), and ray-plane intersection for mouse aiming.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:35:46 +09:00
2f60ace70a feat(game): add player movement with WASD and camera follow
Add blue sphere as the player with WASD movement on XZ plane,
clamped to arena bounds. Camera now tracks player position.
Pre-allocate dynamic UBO buffers for 100 entities to support
future enemies and projectiles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:27:11 +09:00
83c97faed0 feat(game): add survivor_game with arena and quarter-view camera
Static arena with 20x20 floor and 4 box obstacles rendered using the
forward PBR pipeline with shadow mapping. Fixed quarter-view camera
at (0, 15, 10) looking at origin.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 17:00:55 +09:00
3897bb0510 fix(editor): improve button colors for visible hover/active feedback
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 15:51:12 +09:00
2cfb721359 feat(editor): add editor_demo example with IMGUI widgets
Interactive demo showing panel, text, button, slider, and checkbox
widgets rendered via the new UiRenderer pipeline. Uses winit event
loop with mouse input forwarded to UiContext.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 15:23:31 +09:00
cddf9540dd fix(renderer): fix RT shadow shader syntax, experimental features, and R32Float sampler compatibility
- Add 'enable wgpu_ray_query' to RT shadow shader
- Fix RayDesc struct constructor syntax and rayQueryGetCommittedIntersection API
- Enable ExperimentalFeatures in GpuContext for RT
- Change RT shadow texture binding to non-filterable (R32Float)
- Use textureLoad instead of textureSample for RT shadow in lighting pass

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 14:06:20 +09:00
6c9fc0cbf1 feat(renderer): add HDR + Bloom + ACES tonemap to deferred_demo
Lighting pass now renders to Rgba16Float HDR target. A 5-level bloom
mip chain (downsample with bright-extract threshold, then additive
upsample) feeds into an ACES tonemap pass that composites the final
LDR output to the swapchain surface. All resources resize correctly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 13:53:36 +09:00
a5c0179793 feat(renderer): add hardware RT shadows to deferred_demo
Integrate BLAS/TLAS acceleration structures and RT shadow compute pass
into the deferred rendering demo. Adds GpuContext::new_with_features()
for requesting EXPERIMENTAL_RAY_QUERY, Mesh::new_with_usage() for
BLAS_INPUT buffer flags, and extends the lighting shadow bind group
to 9 entries (shadow map + IBL + SSGI + RT shadow).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 13:23:34 +09:00
5198e8606f feat(renderer): add SSGI pass to deferred_demo (AO + color bleeding)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 12:08:50 +09:00
49bfa31639 feat(renderer): add deferred_demo example with multi-light deferred rendering
Demonstrates two-pass deferred rendering: G-Buffer pass writes position,
normal, albedo, and material to 4 render targets; lighting pass composites
with 8 animated orbiting point lights plus a directional light using a
fullscreen triangle.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 11:54:01 +09:00
a1a90ae4f8 feat(audio): add audio_demo example with sine wave playback
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:11:55 +09:00
080ac92fbb fix(renderer): merge IBL into group(3) to stay within max_bind_groups limit of 4
wgpu's default max_bind_groups is 4 (groups 0-3), but the PBR shader was
using group(4) for BRDF LUT bindings. This merges IBL bindings into the
shadow bind group (group 3) at binding slots 3-4, removes the standalone
IBL bind group layout/creation, and updates all examples accordingly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:38:45 +09:00
9202bfadef feat: add IBL demo with normal mapping and procedural environment lighting
Fix pbr_demo, multi_light_demo, and shadow_demo to use the new 7-param
create_pbr_pipeline with PBR texture bind group (4-entry: albedo+normal)
and IBL bind group. Create ibl_demo showcasing a 7x7 metallic/roughness
sphere grid with IBL-based ambient lighting via BRDF LUT integration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:34:06 +09:00
5f962f376e feat: add shadow demo with directional light shadow mapping and 3x3 PCF
- Add Mat4::orthographic() to voltex_math for light projection
- Fix pbr_demo and multi_light_demo to provide shadow bind group (group 3)
  required by updated PBR pipeline (dummy shadow with size=0 disables it)
- Create shadow_demo with two-pass rendering: shadow depth pass using
  orthographic light projection, then PBR color pass with shadow sampling
- Scene: ground plane, 3 spheres, 2 cubes with directional light

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 21:09:27 +09:00
fdfe4aaf5f feat: add multi-light demo with orbiting point lights and spot light
Fix pbr_demo to use LightsUniform/LightData instead of old LightUniform.
Create multi_light_demo with 5 PBR spheres (varying metallic), a ground
plane, 4 colored orbiting point lights, a directional fill light, and a
spot light from above.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:55:24 +09:00
07497c3d80 feat: add PBR demo with metallic/roughness sphere grid
7x7 grid of spheres demonstrating PBR material variation:
metallic increases along X axis, roughness along Y axis.
Uses dynamic UBO pattern for both camera and material uniforms.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:44:29 +09:00
b0c51aaa45 feat: add asset_demo with Handle-based mesh management
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:33:03 +09:00
801ced197a feat: add hierarchy_demo with solar system scene graph
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:23:59 +09:00
ecf876d249 fix(many_cubes): use dynamic uniform buffer for per-entity rendering
Previous approach called write_buffer inside render pass which doesn't
work — GPU only sees the last value at submit time. Now pre-computes all
entity uniforms into a dynamic UBO and uses dynamic offsets per draw call.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:14:18 +09:00
19e37f7f96 feat: add many_cubes ECS demo with 400 entities
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:09:44 +09:00
df06615de4 feat: add model viewer demo with OBJ loading, Blinn-Phong lighting, FPS camera
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 19:56:28 +09:00
81ba6f7e5d feat: implement Phase 1 foundation - triangle rendering
- voltex_math: Vec3 with arithmetic ops, dot, cross, length, normalize
- voltex_platform: VoltexWindow (winit wrapper), InputState (keyboard/mouse),
  GameTimer (fixed timestep + variable render loop)
- voltex_renderer: GpuContext (wgpu init), Vertex + buffer layout,
  WGSL shader, render pipeline
- triangle example: colored triangle with ESC to exit

All 13 tests passing. Window renders RGB triangle on dark background.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 19:34:39 +09:00
c5b71b32b7 feat: initialize cargo workspace with voltex_math, voltex_platform, voltex_renderer
Phase 1 Task 1 - workspace scaffolding with stub crates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:47:02 +09:00