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
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
5232552aa4
feat(renderer): add normal mapping and procedural IBL to PBR shader
...
- Add tangent input (location 3) and TBN computation in vertex shader
- Add normal map sampling (group 1, bindings 2-3) for tangent-space normal mapping
- Add BRDF LUT binding (group 4, bindings 0-1) for specular IBL
- Add procedural sky environment function for diffuse/specular IBL
- Replace flat ambient with split-sum IBL approximation
- Add pbr_texture_bind_group_layout (4 entries: albedo + normal)
- Add create_pbr_texture_bind_group helper and flat_normal_1x1 texture
- Update create_pbr_pipeline to accept ibl_layout parameter (group 4)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-24 21:28:32 +09:00
8f962368e9
feat(renderer): integrate shadow map sampling with 3x3 PCF into PBR shader
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-24 21:03:31 +09:00
b0934970b9
feat(renderer): add multi-light system with LightsUniform and updated PBR shader
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-03-24 20:50:13 +09:00
b09e1df878
feat(renderer): add PBR material, sphere generator, Cook-Torrance shader, and PBR pipeline
...
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-03-24 20:41:02 +09:00