You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Add a debanding property to Viewport for GLES3
It can be enabled in the Project Settings (`rendering/quality/filters/use_debanding`). It's disabled by default as it has a small performance impact and can make PNG screenshots much larger (due to how dithering works). As a result, it should be enabled only when banding is noticeable enough. Since debanding requires a HDR viewport to work, it's only supported in the GLES3 backend.
This commit is contained in:
@@ -2478,7 +2478,7 @@ void SpatialEditorViewport::_notification(int p_what) {
|
||||
viewport_container->set_stretch_shrink(shrink ? 2 : 1);
|
||||
}
|
||||
|
||||
//update msaa if changed
|
||||
// Update MSAA, FXAA, debanding and HDR if changed.
|
||||
|
||||
int msaa_mode = ProjectSettings::get_singleton()->get("rendering/quality/filters/msaa");
|
||||
viewport->set_msaa(Viewport::MSAA(msaa_mode));
|
||||
@@ -2486,6 +2486,9 @@ void SpatialEditorViewport::_notification(int p_what) {
|
||||
bool use_fxaa = ProjectSettings::get_singleton()->get("rendering/quality/filters/use_fxaa");
|
||||
viewport->set_use_fxaa(use_fxaa);
|
||||
|
||||
bool use_debanding = ProjectSettings::get_singleton()->get("rendering/quality/filters/use_debanding");
|
||||
viewport->set_use_debanding(use_debanding);
|
||||
|
||||
bool hdr = ProjectSettings::get_singleton()->get("rendering/quality/depth/hdr");
|
||||
viewport->set_hdr(hdr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user