bevy/crates/bevy_pbr/src
Elabajaba 0f5d8128c9
Fix prepass binding issues causing crashes when not all prepass bindings are used (#10788)
# Objective

Fixes https://github.com/bevyengine/bevy/issues/10786

## Solution

The bind_group_layout entries for the prepass were wrong when not all 4
prepass textures were used, as it just zipped [17, 18, 19, 20] with the
smallvec of prepass `bind_group_layout` entries that potentially didn't
contain 4 entries. (eg. if you had a depth and motion vector prepass but
no normal prepass, then depth would be correct but the entry for the
motion vector prepass would be 18 (normal prepass' spot) instead of 19).

Change the prepass `get_bind_group_layout_entries` function to return an
array of `[Option<BindGroupLayoutEntryBuilder>; 4]` and only add the
layout entry if it exists.
2023-11-29 23:11:12 +00:00
..
deferred Bind group layout entries (#10224) 2023-11-28 04:00:49 +00:00
environment_map Bind group layout entries (#10224) 2023-11-28 04:00:49 +00:00
prepass Fix prepass binding issues causing crashes when not all prepass bindings are used (#10788) 2023-11-29 23:11:12 +00:00
render Fix prepass binding issues causing crashes when not all prepass bindings are used (#10788) 2023-11-29 23:11:12 +00:00
ssao Bind group layout entries (#10224) 2023-11-28 04:00:49 +00:00
alpha.rs bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
bundle.rs Fix a typo in DirectionalLightBundle (#9861) 2023-09-20 04:44:56 +00:00
extended_material.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
fog.rs chore: use ExtractComponent derive macro for EnvironmentMapLight and FogSettings (#10191) 2023-10-19 20:18:33 +00:00
lib.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
light.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
material.rs Remove unnecessary path prefixes (#10749) 2023-11-28 23:43:40 +00:00
parallax.rs bevy_reflect: FromReflect Ergonomics Implementation (#6056) 2023-06-29 01:31:34 +00:00
pbr_material.rs StandardMaterial Light Transmission (#8015) 2023-10-31 20:59:02 +00:00
wireframe.rs Register WireframeColor (#10486) 2023-11-12 17:07:15 +00:00