Add a Viewport property to use full floating-point precision in HDR

This is only available on the GLES3 backend.

This can be useful for advanced shaders, but it should generally
not be enabled otherwise as full precision has a performance cost.
For general-purpose rendering, the built-in debanding filter should
be used to reduce banding instead.
This commit is contained in:
Hugo Locurcio 2021-08-16 03:16:01 +02:00
parent 66497e2ecb
commit 5335a0368c
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
13 changed files with 76 additions and 12 deletions

View file

@ -2520,9 +2520,12 @@ void SpatialEditorViewport::_notification(int p_what) {
float sharpen_intensity = ProjectSettings::get_singleton()->get("rendering/quality/filters/sharpen_intensity");
viewport->set_sharpen_intensity(sharpen_intensity);
bool hdr = ProjectSettings::get_singleton()->get("rendering/quality/depth/hdr");
const bool hdr = ProjectSettings::get_singleton()->get("rendering/quality/depth/hdr");
viewport->set_hdr(hdr);
const bool use_32_bpc_depth = ProjectSettings::get_singleton()->get("rendering/quality/depth/use_32_bpc_depth");
viewport->set_use_32_bpc_depth(use_32_bpc_depth);
bool show_info = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_INFORMATION));
info_label->set_visible(show_info);