fix(pcss example): separate light entities and adjust intensity instead of remove components#23802
fix(pcss example): separate light entities and adjust intensity instead of remove components#23802kfc35 wants to merge 1 commit intobevyengine:mainfrom
Conversation
|
In my opinion, we should avoid band-aid solutions when they hide a deeper problem that users will face. |
I agree with this, and I think ideally, the other PR (or something inspired by it) is merged too (#23769). In fact I think I’ll take it out of draft to be seriously considered. However, I still think this should be considered. #23713 makes me question whether an entity should switch between light sources because of how directional and spot light shadows maps are co-located (IIUC from reading the code in |
…ad of remove components
4f54bdd to
ddf6adc
Compare
|
I think changing light types on the same entities makes sense in an editor context, where you might have a light entity where the user can easily swap between the different light types. More broadly, from what i've seen, bevy tries to support every user land setup it can, so it is nice to keep examples broken as a kind of test (that's part of the role of examples from my understanding) |
Objective
SyncComponentsis configured for lights (I can make an issue for this if desired -- basically despawning and then respawning a light on the same entity probably has some broken aspect to it as evidenced by this example being broken)The other PR (#23790) I have open will not fully fix the example once #23713 is merged anyway, since that PR will cause a separate issue — shadow maps will only generated once for spot / point lights, and I’ve run into issues removing and re-adding lights and their associated render components given that constraint.
Solution
SyncComponentshappening.Testing
cargo run --example pcss --features=“experimental_pbr_pcss"