Commit Graph

7 Commits

Author SHA1 Message Date
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
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
4debec43e7 feat(renderer): add bloom/tonemap pipelines and convert lighting to HDR output
- deferred_pipeline.rs: add bloom_bind_group_layout, create_bloom_downsample_pipeline (NO blend),
  create_bloom_upsample_pipeline (additive One+One blend), tonemap_bind_group_layout, create_tonemap_pipeline
- deferred_lighting.wgsl: remove Reinhard tonemap + gamma correction; output raw HDR linear colour
- lib.rs: export new pipeline functions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 13:49:32 +09:00
b556cdd768 feat(renderer): add RT shadow compute pipeline and integrate into lighting pass
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 13:14:28 +09:00
3248cd3529 feat(renderer): integrate SSGI output into deferred lighting pass
Adds t_ssgi/s_ssgi bindings (group 2, bindings 5-6) to
lighting_shadow_bind_group_layout and deferred_lighting.wgsl. Replaces the
simple ambient term with SSGI-modulated ambient: ao*ssgi_ao applied to IBL
diffuse+specular, plus ssgi_indirect for indirect color bleeding.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 12:05:08 +09:00
f6912be248 feat(renderer): add deferred lighting pass shader with Cook-Torrance BRDF
Implements deferred_lighting.wgsl for the fullscreen lighting pass:
reads G-Buffer textures, runs the identical Cook-Torrance BRDF functions
(distribution_ggx, geometry_smith, fresnel_schlick, attenuation, etc.)
from pbr_shader.wgsl, computes multi-light contribution with PCF shadow
and IBL, then applies Reinhard tonemapping and gamma correction.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 11:49:38 +09:00