bevy/benches/benches
charlotte 4c3b7679ec
#12502 Remove limit on RenderLayers. (#13317)
# Objective

Remove the limit of `RenderLayer` by using a growable mask using
`SmallVec`.

Changes adopted from @UkoeHB's initial PR here
https://github.com/bevyengine/bevy/pull/12502 that contained additional
changes related to propagating render layers.

Changes

## Solution

The main thing needed to unblock this is removing `RenderLayers` from
our shader code. This primarily affects `DirectionalLight`. We are now
computing a `skip` field on the CPU that is then used to skip the light
in the shader.

## Testing

Checked a variety of examples and did a quick benchmark on `many_cubes`.
There were some existing problems identified during the development of
the original pr (see:
https://discord.com/channels/691052431525675048/1220477928605749340/1221190112939872347).
This PR shouldn't change any existing behavior besides removing the
layer limit (sans the comment in migration about `all` layers no longer
being possible).

---

## Changelog

Removed the limit on `RenderLayers` by using a growable bitset that only
allocates when layers greater than 64 are used.

## Migration Guide

- `RenderLayers::all()` no longer exists. Entities expecting to be
visible on all layers, e.g. lights, should compute the active layers
that are in use.

---------

Co-authored-by: robtfm <50659922+robtfm@users.noreply.github.com>
2024-05-16 16:15:47 +00:00
..
bevy_ecs Cluster small table/archetype into single Task in parallel iteration (#12846) 2024-04-04 07:09:26 +00:00
bevy_math Rename Bezier to CubicBezier for clarity (#9554) 2023-08-28 17:37:42 +00:00
bevy_reflect Add reflect path parsing benchmark (#9364) 2023-08-25 14:30:26 +00:00
bevy_render #12502 Remove limit on RenderLayers. (#13317) 2024-05-16 16:15:47 +00:00
bevy_tasks Fix clippy issue for benches crate (#6806) 2023-01-11 09:32:07 +00:00