-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
Check RenderingDevice availability to display LightmapGI configuration warnings #97416
Check RenderingDevice availability to display LightmapGI configuration warnings #97416
Conversation
This look’s great though i think maybe an additional comment should be added for the android editor when trying to bake since it would confuse people why they can’t bake lightmap gi if they can use the vulkan mobile backend. |
7f38778
to
5d7e758
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How often is get_configuration_warnings
called? Its after every property change right? If so, we need to cache the result of can_create_rendering_device()
somewhere or else this is going to make things very slow
5d7e758
to
88a0ab6
Compare
Done, see OP for new screenshots.
I've just checked by benchmarking how time it takes to call
|
88a0ab6
to
0407618
Compare
…n warnings We can now check whether RenderingDevice can be created (which is not guaranteed when using the Compatibility rendering method), so the warning can be displayed only when relevant. This also disables the Bake Lightmaps button with a tooltip if baking is not available.
0407618
to
0807d60
Compare
Did you test this with the Compatibility renderer? That's where it might be expensive. |
Indeed, I just tried and it takes much longer to run there (easily over 5 minutes for 1,000 calls). Caching this result avoids the issue entirely: #97698 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for taking a look at the performance. This is good to merge after #97698
Thanks! |
and Disable creating RD projects in project manager if RD is not supported #91172.
We can now check whether RenderingDevice can be created (which is not guaranteed when using the Compatibility rendering method), so the warning can be displayed only when relevant.
This also disables the Bake Lightmaps button with a tooltip if baking is not available.
Preview
Ignore the GPU model name (it obviously supports Vulkan), I just changed the condition to get the dialog to show up.
Edit: Now displays dedicated warnings if
lightmapper_rd
was disabled at compile-time, including a specific message for mobile platforms.