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>
This commit is contained in:
2026-03-25 20:41:30 +09:00
parent 164eead5ec
commit 6bc77cb777
10 changed files with 248 additions and 27 deletions

View File

@@ -260,6 +260,7 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
let metallic = mat_sample.r;
let roughness = mat_sample.g;
let ao = mat_sample.b;
let emissive_lum = mat_sample.w;
let V = normalize(camera_uniform.camera_pos - world_pos);
@@ -306,7 +307,10 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
let ambient = (diffuse_ibl + specular_ibl) * ao * ssgi_ao + ssgi_indirect;
// Output raw HDR linear colour; tonemap is applied in a separate tonemap pass.
let color = ambient + Lo;
var color = ambient + Lo;
// Add emissive contribution (luminance stored in G-Buffer, modulated by albedo)
color += albedo * emissive_lum;
return vec4<f32>(color, alpha);
}