-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rendering bugs when abusing custom UI material #10431
Labels
Comments
In all your examples you kept the button with both a |
github-merge-queue bot
pushed a commit
that referenced
this issue
Nov 7, 2023
) # Objective - Entities with both a `BackgroundColor` and a `Handle<CustomUiMaterial>` are extracted by both pipelines and results in entities being overwritten in the render world - Fixes #10431 ## Solution - Ignore entities with `BackgroundColor` when extracting ui material entities, and document that limit
cart
pushed a commit
that referenced
this issue
Nov 30, 2023
) # Objective - Entities with both a `BackgroundColor` and a `Handle<CustomUiMaterial>` are extracted by both pipelines and results in entities being overwritten in the render world - Fixes #10431 ## Solution - Ignore entities with `BackgroundColor` when extracting ui material entities, and document that limit
rdrpenguin04
pushed a commit
to rdrpenguin04/bevy
that referenced
this issue
Jan 9, 2024
…yengine#10434) # Objective - Entities with both a `BackgroundColor` and a `Handle<CustomUiMaterial>` are extracted by both pipelines and results in entities being overwritten in the render world - Fixes bevyengine#10431 ## Solution - Ignore entities with `BackgroundColor` when extracting ui material entities, and document that limit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bevy version
0.12.0
Relevant system information
What you did
I started with the UI Material example.
Curious to see if I could attach shaders to existing bevy_ui bundles, and bypass
MaterialUiBundle
, I attempted to add aHandle<CustomUiMaterial>
to aButtonBundle
to see what it would do. I got a white square, and figured I was doing something I shouldn't be anyway, perhaps the other components (background_color / border_color / image) were drawing over it or something. I figured that was somewhat expected behaviour. Then I decided to put them side by side, and encountered some less expected behaviour.What went wrong
draws:
![image](https://private-user-images.githubusercontent.com/38416468/281042722-817bfce9-597e-4cf7-ab5e-928f287ad216.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTQ0MjMsIm5iZiI6MTczOTE5NDEyMywicGF0aCI6Ii8zODQxNjQ2OC8yODEwNDI3MjItODE3YmZjZTktNTk3ZS00Y2Y3LWFiNWUtOTI4ZjI4N2FkMjE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDEzMjg0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVkZTJjODRhZGUyZWI4NmU2MjBkMTUyOGIyYjJiYjdlNmFhMThhYmU4N2JiMWI3MjRmNWU1MzAzZTNmMmVjNGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.BWzzGnz3tIO4upwNQdR0eAOmxTtqYrTeGergDGaOwiQ)
but swapping the children
draws:
![image](https://private-user-images.githubusercontent.com/38416468/281043897-1f7e8237-d0a4-45dc-a8b1-2e45afc32737.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxOTQ0MjMsIm5iZiI6MTczOTE5NDEyMywicGF0aCI6Ii8zODQxNjQ2OC8yODEwNDM4OTctMWY3ZTgyMzctZDBhNC00NWRjLWE4YjEtMmU0NWFmYzMyNzM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDEzMjg0M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFlYmQ4NTJlMjEzZTlkMjljNmMwYzM3YjE5YzY0MWYxMTI0MDU0ZDBlOGE4MmExYWI3MjYzNzFiNjVjNGU4OWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.powoxU4XojJt_3ZTsNIeq2XsTAo6Aq6Cyy9cH__EjRM)
We can see that the circle still takes up space, but isn't rendered.
Using other combinations, e.g.
Additional information
Is it possible the shader is silently crashing as soon as it encounters the
ButtonBundle
, so using the shader after that fails?I don't know if this is a bug to fix or just something to be documented.
The text was updated successfully, but these errors were encountered: