bevy/crates/bevy_pbr/src
IceSentry 65d9a7535a
Move non-generic parts of the PrepassPipeline to internal field (#18322)
# Objective

- The prepass pipeline has a generic bound on the specialize function
but 95% of it doesn't need it

## Solution

- Move most of the fields to an internal struct and use a separate
specialize function for those fields

## Testing

- Ran the 3d_scene and it worked like before

---

## Migration Guide

If you were using a field of the `PrepassPipeline`, most of them have
now been move to `PrepassPipeline::internal`.

## Notes

Here's the cargo bloat size comparison (from this tool
https://github.com/bevyengine/bevy/discussions/14864):

```
before:
    (
        "<bevy_pbr::prepass::PrepassPipeline<M> as bevy_render::render_resource::pipeline_specializer::SpecializedMeshPipeline>::specialize",
        25416,
        0.05582993,
    ),

after:
    (
        "<bevy_pbr::prepass::PrepassPipeline<M> as bevy_render::render_resource::pipeline_specializer::SpecializedMeshPipeline>::specialize",
        2496,
        0.005490916,
    ),
    (
        "bevy_pbr::prepass::PrepassPipelineInternal::specialize",
        11444,
        0.025175499,
    ),
```

The size for the specialize function that is generic is now much
smaller, so users won't need to recompile it for every material.
2025-03-25 18:47:31 +00:00
..
atmosphere bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
cluster bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
decal bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
deferred Remove prepasses from the render world when they're removed from the main world. (#17565) 2025-02-14 06:43:35 +00:00
light bugfix(frustra of point lights were not recalculated when a camera changes) (#18519) 2025-03-25 04:48:49 +00:00
light_probe bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
lightmap bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
meshlet Move non-generic parts of the PrepassPipeline to internal field (#18322) 2025-03-25 18:47:31 +00:00
prepass Move non-generic parts of the PrepassPipeline to internal field (#18322) 2025-03-25 18:47:31 +00:00
render Fix unecessary specialization checks for apps with many materials (#18410) 2025-03-19 06:22:39 +00:00
ssao Add bevy_anti_aliasing (#18323) 2025-03-19 18:40:32 +00:00
ssr bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
volumetric_fog bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
components.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
extended_material.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
fog.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
lib.rs Add missing system ordering constraint to prepare_lights (#18308) 2025-03-15 22:57:52 +00:00
material_bind_groups.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
material.rs Fix specialize_shadows system ordering (#18412) 2025-03-19 06:40:45 +00:00
mesh_material.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
parallax.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
pbr_material.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00
wireframe.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00