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>
This commit is contained in:
@@ -8,7 +8,6 @@ pub fn create_pbr_pipeline(
|
||||
texture_layout: &wgpu::BindGroupLayout,
|
||||
material_layout: &wgpu::BindGroupLayout,
|
||||
shadow_layout: &wgpu::BindGroupLayout,
|
||||
ibl_layout: &wgpu::BindGroupLayout,
|
||||
) -> wgpu::RenderPipeline {
|
||||
let shader = device.create_shader_module(wgpu::ShaderModuleDescriptor {
|
||||
label: Some("PBR Shader"),
|
||||
@@ -17,7 +16,7 @@ pub fn create_pbr_pipeline(
|
||||
|
||||
let layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
|
||||
label: Some("PBR Pipeline Layout"),
|
||||
bind_group_layouts: &[camera_light_layout, texture_layout, material_layout, shadow_layout, ibl_layout],
|
||||
bind_group_layouts: &[camera_light_layout, texture_layout, material_layout, shadow_layout],
|
||||
immediate_size: 0,
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user