mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
2c0ff950d1
# Objective - @mockersf identified a performance regression of about 25% longer frame times introduced by #7784 in a complex scene with the Amazon Lumberyard bistro scene with both exterior and interior variants and a number of point lights with shadow mapping enabled - The additional time seemed to be spent in the `ShadowPassNode` - `ShadowPassNode` encodes the draw commands for the shadow phase. Roughly the same numbers of entities were having draw commands encoded, so something about the way they were being encoded had changed. - One thing that definitely changed was that the pipeline used will be different depending on the alpha mode, and the scene has lots entities with opaque and blend materials. This suggested that maybe the pipeline was changing a lot so I tried a quick hack to see if it was the problem. ## Solution - Sort the shadow phase items by their pipeline id - This groups phase items by their pipeline id, which significantly reduces pipeline rebinding required to the point that the performance regression was gone. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |