mirror of
https://github.com/bevyengine/bevy
synced 2024-12-28 05:53:07 +00:00
d3241c4f8d
The bindless PR (#16368) broke some examples: * `specialized_mesh_pipeline` and `custom_shader_instancing` failed because they expect to be able to render a mesh with no material, by overriding enough of the render pipeline to be able to do so. This PR fixes the issue by restoring the old behavior in which we extract meshes even if they have no material. * `texture_binding_array` broke because it doesn't implement `AsBindGroup::unprepared_bind_group`. This was tricky to fix because there's a very good reason why `texture_binding_array` doesn't implement that method: there's no sensible way to do so with `wgpu`'s current bindless API, due to its multiple levels of borrowed references. To fix the example, I split `MaterialBindGroup` into `MaterialBindlessBindGroup` and `MaterialNonBindlessBindGroup`, and allow direct custom implementations of `AsBindGroup::as_bind_group` for the latter type of bind groups. To opt in to the new behavior, return the `AsBindGroupError::CreateBindGroupDirectly` error from your `AsBindGroup::unprepared_bind_group` implementation, and Bevy will call your custom `AsBindGroup::as_bind_group` method as before. ## Migration Guide * Bevy will now unconditionally call `AsBindGroup::unprepared_bind_group` for your materials, so you must no longer panic in that function. Instead, return the new `AsBindGroupError::CreateBindGroupDirectly` error, and Bevy will fall back to calling `AsBindGroup::as_bind_group` as before. |
||
---|---|---|
.. | ||
animate_shader.rs | ||
array_texture.rs | ||
automatic_instancing.rs | ||
compute_shader_game_of_life.rs | ||
custom_phase_item.rs | ||
custom_post_processing.rs | ||
custom_shader_instancing.rs | ||
custom_vertex_attribute.rs | ||
extended_material.rs | ||
fallback_image.rs | ||
gpu_readback.rs | ||
shader_defs.rs | ||
shader_material.rs | ||
shader_material_2d.rs | ||
shader_material_bindless.rs | ||
shader_material_glsl.rs | ||
shader_material_screenspace_texture.rs | ||
shader_prepass.rs | ||
specialized_mesh_pipeline.rs | ||
storage_buffer.rs | ||
texture_binding_array.rs |