fix(Rect Lights): rect_lights should be written out to GpuLights#24024
Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom Apr 29, 2026
Merged
fix(Rect Lights): rect_lights should be written out to GpuLights#24024alice-i-cecile merged 1 commit intobevyengine:mainfrom
rect_lights should be written out to GpuLights#24024alice-i-cecile merged 1 commit intobevyengine:mainfrom
Conversation
tychedelia
approved these changes
Apr 29, 2026
alice-i-cecile
approved these changes
Apr 29, 2026
pull Bot
pushed a commit
to octoape/bevy
that referenced
this pull request
Apr 29, 2026
# Objective - Regression test for broken Rect Lights ## Solution - Add a rectangular light to testbed/3d ## Testing - `cargo run --example testbed_3d` - I can see the new light (well, after bevyengine#24024 is merged hehe) Before (w/o rect light) <img width="1271" height="747" alt="Screenshot 2026-04-28 at 11 28 16 PM" src="https://github.com/user-attachments/assets/aa6b6258-e80d-4a98-861c-bcad6e8db541" /> After (w/ rect light - it’s behind the cube) <img width="1271" height="750" alt="Screenshot 2026-04-28 at 11 25 33 PM" src="https://github.com/user-attachments/assets/877013f0-843a-43f2-9dbd-96f2fa37d8e2" />
tychedelia
pushed a commit
to processing/bevy
that referenced
this pull request
Apr 30, 2026
…evyengine#24024) # Objective - The `rect_light` half of bevyengine#23997 ## Solution - Move the statement that writes `gpu_lights` *after* the code block that sets rect_light information within `gpu_lights`. If only all the rendering bugs were this easy... ## Testing - `cargo run --example rect_light --features=“free_camera”` works again <img width="1271" height="744" alt="Screenshot 2026-04-28 at 11 08 32 PM" src="https://github.com/user-attachments/assets/84018902-1f70-4a8c-9e16-982d156fb8b4" />
tychedelia
pushed a commit
to processing/bevy
that referenced
this pull request
Apr 30, 2026
# Objective - Regression test for broken Rect Lights ## Solution - Add a rectangular light to testbed/3d ## Testing - `cargo run --example testbed_3d` - I can see the new light (well, after bevyengine#24024 is merged hehe) Before (w/o rect light) <img width="1271" height="747" alt="Screenshot 2026-04-28 at 11 28 16 PM" src="https://github.com/user-attachments/assets/aa6b6258-e80d-4a98-861c-bcad6e8db541" /> After (w/ rect light - it’s behind the cube) <img width="1271" height="750" alt="Screenshot 2026-04-28 at 11 25 33 PM" src="https://github.com/user-attachments/assets/877013f0-843a-43f2-9dbd-96f2fa37d8e2" />
kfc35
added a commit
to kfc35/bevy
that referenced
this pull request
Apr 30, 2026
…ight` has changed (bevyengine#24038) # Objective - Fixes bevyengine#23997 for `spotlight` (`rect_light` fixed with bevyengine#24024 already) - The spotlight example changes the transform of each spotlight, but the `ExtractedView` and the `Frustum` for the spotlight never updates, hence why the light doesn’t look complete for subsequent frames. ## Solution - For Spot lights (and Point lights since those were also affected), update the `ExtractedView` and the `Frustum` if its corresponding `ExtractedPointLight` has changed. - AFAIK this isn’t needed for Directional lights because `ExtractedView`s aren’t re-used — they’re made anew in `prepare_lights` ## Testing - `cargo run --example spotlight` works as desired. - `cargo run --example async_channel_pattern` works as desired (for PointLight testing) - @Zeophlite assist with the example runner (was done before the frusta change though)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
rect_lighthalf of Example spotlight and rect_light render incorrectly #23997Solution
gpu_lightsafter the code block that sets rect_light information withingpu_lights. If only all the rendering bugs were this easy...Testing
cargo run --example rect_light --features=“free_camera”works again