diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 0c3d3f512de..c5bcd9908da 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -294,7 +294,7 @@ The default exposure used for tonemapping. - The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.) + The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a SDR display. (Godot doesn't support rendering on HDR displays yet.) The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 6ce847cd6ed..77e8191a78b 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -3028,7 +3028,8 @@ - If [code]true[/code], the viewport renders to hdr. + If [code]true[/code], the viewport renders to high dynamic range (HDR) instead of standard dynamic range (SDR). See also [method viewport_set_use_32_bpc_depth]. + [b]Note:[/b] Only available on the GLES3 backend. @@ -3138,6 +3139,15 @@ Sets the viewport's 2D/3D mode. See [enum ViewportUsage] constants for options. + + + + + + If [code]true[/code], allocates the viewport's framebuffer with full floating-point precision (32-bit) instead of half floating-point precision (16-bit). Only effective if [method viewport_set_use_32_bpc_depth] is used on the same [Viewport] to set HDR to [code]true[/code]. + [b]Note:[/b] Only available on the GLES3 backend. + + diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index c8fb595c564..f56e4202775 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -2095,6 +2095,7 @@ void VisualServer::_bind_methods() { ClassDB::bind_method(D_METHOD("viewport_set_use_debanding", "viewport", "debanding"), &VisualServer::viewport_set_use_debanding); ClassDB::bind_method(D_METHOD("viewport_set_sharpen_intensity", "viewport", "intensity"), &VisualServer::viewport_set_sharpen_intensity); ClassDB::bind_method(D_METHOD("viewport_set_hdr", "viewport", "enabled"), &VisualServer::viewport_set_hdr); + ClassDB::bind_method(D_METHOD("viewport_set_use_32_bpc_depth", "viewport", "enabled"), &VisualServer::viewport_set_use_32_bpc_depth); ClassDB::bind_method(D_METHOD("viewport_set_usage", "viewport", "usage"), &VisualServer::viewport_set_usage); ClassDB::bind_method(D_METHOD("viewport_get_render_info", "viewport", "info"), &VisualServer::viewport_get_render_info); ClassDB::bind_method(D_METHOD("viewport_set_debug_draw", "viewport", "draw"), &VisualServer::viewport_set_debug_draw);