-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
GLTF rendering is no longer predictable after 0.13 #12066
Comments
I was unable to reproduce this on my machine, using the zipfile linked. 2024-02-23T19:33:07.795597Z INFO log: Adapter Metal AdapterInfo { name: "Apple M1", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2024-02-23T19:33:07.796343Z INFO bevy_render::renderer: AdapterInfo { name: "Apple M1", vendor: 0, device: 0, device_type: IntegratedGpu, driver: "", driver_info: "", backend: Metal }
2024-02-23T19:33:08.136412Z INFO bevy_winit::system: Creating new window "App" (0v1)
2024-02-23T19:33:08.165192Z INFO bevy_diagnostic::system_information_diagnostics_plugin::internal: SystemInfo { os: "MacOS 14.2.1 ", kernel: "23.2.0", cpu: "Apple M1", core_count: "8", memory: "16.0 GiB" } How many times did you have to run the program in order to see the incorrect behavior? All of the images rendered correctly for me. |
Odd, there must be some architectural differences that makes the bug more common on your system. Let's wait for someone else to weigh in and test it... |
This is due to asynchronous pipeline compilation, which is disabled on macOS or without feature What's happening is:
This is most of the times not a problem because Bevy keeps trying to render things every frame, but in your case you're only rendering it once |
(async pipeline compilation can be disabled with this setting on Or you can try to make sure all pipelines are compiled before advancing from a loading state. |
Thank you a lot, disabling async pipeline compilation fixed the issue. |
How can I do so? |
It's a bit of a pain. You need to create a "loading scene" that has every permutation of material properties or whatever so that all pipelines are created. And then in the render app, check that status of all pipelines in There are advantages though -- on the web, pipeline compilation hangs the app and causes audio weirdness. This tiny plugin can help a bit: https://github.com/rparrett/bevy_pipelines_ready. See also: #10871 |
Thanks! |
I think an important missing feature is a reasonable way to detect when everything in a scene is "fully ready to render". |
Bevy version
0.13
[Optional] Relevant system information
OS: ArchLinux
CPU: 32 × AMD Ryzen 9 5950X 16-Core Processor
What you did
I rendering to texture in order to have preview for models in my game.
In 0.12 I discovered a bug #10688 that has been fixed in #10745.
What went wrong
But after update to 0.13 it looks like it has been reintroduced. I have the same problem, sometimes it renders the asset, sometimes not.
Additional information
Here is the minimal example to reproduce: assets_render.zip.
If you disable
multi-threaded
feature, it will work as expected.With the following changes the code compiles on 0.12 and works as expected with
multi-threaded
feature on:The text was updated successfully, but these errors were encountered: