-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Add project settings to globally disable resource-intensive Environment features #5229
Comments
Related to: #2183 |
I have a WIP implementation of this (only for glow currently): https://github.com/Calinou/godot/tree/environment-add-effect-allow-properties Testing project: test_environment_allow.zip @clayjohn Is this implementation sound, and can it be made to work in OpenGL without code duplication? The underlying code doesn't need to change much between backends – it only needs to override the environment getter's value with |
I would add the check in the environment storage class so you only need to do it once and it works everywhere. Here is where glow is set: You could add a variable to environment like
|
Describe the project you are working on
The Godot editor 🙂
Describe the problem or limitation you are having in your project
On low-end GPUs or mobile devices, significant performance gains can be obtained by disabling demanding Environment post-processing features.
However, this isn't very convenient to do right now, especially in projects that use different Environment resources.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add project settings to globally disable resource-intensive Environment features. This includes:
Cheap features such as tonemapping, non-volumetric fog and adjustments probably don't need similar "kill switch" settings, as there is little reason to disable them globally.
This should also be adjustable at run-time, so that graphics settings menus can adjust these options without having to get the Environment resource (which is cumbersome for projects that have different environments in each level).
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This would require adding project settings, but also RenderingServer properties for run-time changes. I suggest naming the settings as such (example for volumetric fog):
ProjectSettings.rendering/environment/effects/allow_volumetric_fog
(only read when the project starts)RenderingServer.environment_allow_volumetric_fog
(can be changed at run-time)If set to
true
, the environment is allowed to use volumetric fog. (In other words, setting this totrue
does not enable volumetric fog globally). If set tofalse
, volumetric fog is always disabled, even if the Environment resource requests it.These settings are ignored while in the editor, so that you can always preview Environment effects without having to toggle the settings back on. They will however be respected when running the project in the editor.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Yes, if your project only uses a single Environment in all its scenes. Otherwise, no, as every environment has its own toggles.
Is there a reason why this should be core and not an add-on in the asset library?
This is about making 3D graphics settings easier to implement. Since these menus are must-have for scalability across various GPUs, it's important to make this process as seamless as possible.
Keywords for easier searching: postprocess, postprocessing
The text was updated successfully, but these errors were encountered: