Make Skybox not break rendering if its image is default or 2D.#23689
Merged
alice-i-cecile merged 1 commit intobevyengine:mainfrom Apr 11, 2026
Merged
Make Skybox not break rendering if its image is default or 2D.#23689alice-i-cecile merged 1 commit intobevyengine:mainfrom
Skybox not break rendering if its image is default or 2D.#23689alice-i-cecile merged 1 commit intobevyengine:mainfrom
Conversation
alice-i-cecile
approved these changes
Apr 6, 2026
| // catch here, but this is a common mistake (passing a 2D image to `Skybox`) and | ||
| // also the result of `Skybox::default()` and not overriding the `image`. | ||
| warn_once!( | ||
| "skybox {entity}'s image {image:?} has texture view dimension \ |
Contributor
There was a problem hiding this comment.
Suggested change
| "skybox {entity}'s image {image:?} has texture view dimension \ | |
| "Skybox {entity}'s image {image:?} has texture view dimension \ |
Contributor
Author
There was a problem hiding this comment.
I’m happy to change this if required, but is there a project style guide that specifies this?
By default, for all error, panic, and warning messages, I follow Rust API Guidelines — which is specific to errors, but I believe consistency is a good principle here: “The error message given by the Display representation of an error type should be lowercase without trailing punctuation”.
jasmine-nominal
approved these changes
Apr 10, 2026
Contributor
jasmine-nominal
left a comment
There was a problem hiding this comment.
Lgtm minus one nit
beece36 to
12d02a3
Compare
Contributor
Author
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
Skybox::default()causes an internal error #23688.Skybox.Solution
If the image is detected to be invalid, have
prepare_skybox_bind_groupsignore it (and warn once).Testing
Manually tested that
examples/3d/skybox.rsworks if the initial skybox has the default image.If there’s a good way to programmatically test things like this, let me know — I didn’t see any similar tests to emulate.