From afaa68628a809194e1d200521294d966eb07595c Mon Sep 17 00:00:00 2001 From: clayjohn Date: Tue, 1 Oct 2019 07:55:04 -0700 Subject: [PATCH] updated defaults and documentation for GLES2 glow --- doc/classes/Environment.xml | 7 ++++--- drivers/gles2/rasterizer_scene_gles2.h | 6 +++--- scene/resources/environment.cpp | 5 ----- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 9a943aba516..2b44eb81b18 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -177,6 +177,7 @@ Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog. + Smooths out blockiness created by sampling higher levels. Glow blending mode. @@ -193,10 +194,10 @@ Bleed scale of the HDR glow. - Bleed threshold of the HDR glow. + Bleed threshold of the HDR glow. In GLES2, this needs to be below 1.0 in order for glow to be visible, a default value of 0.9 works well. - Glow intensity. + Glow intensity. In GLES2, this should be increased to 1.5 by default to compensate for not using HDR. First level of glow (most local). @@ -220,7 +221,7 @@ Seventh level of glow (most global). - Glow strength. + Glow strength. In GLES2, this should be increased to 1.3 by default to compensate for not using HDR. diff --git a/drivers/gles2/rasterizer_scene_gles2.h b/drivers/gles2/rasterizer_scene_gles2.h index 366a9020fc2..7babcfeed12 100644 --- a/drivers/gles2/rasterizer_scene_gles2.h +++ b/drivers/gles2/rasterizer_scene_gles2.h @@ -420,11 +420,11 @@ public: canvas_max_layer(0), glow_enabled(false), glow_levels((1 << 2) | (1 << 4)), - glow_intensity(1.5), - glow_strength(1.3), + glow_intensity(0.8), + glow_strength(1.0), glow_bloom(0.0), glow_blend_mode(VS::GLOW_BLEND_MODE_SOFTLIGHT), - glow_hdr_bleed_threshold(0.9), + glow_hdr_bleed_threshold(1.0), glow_hdr_bleed_scale(2.0), glow_hdr_luminance_cap(12.0), glow_bicubic_upscale(false), diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index 2817ec4eb08..bc96b5e9f3e 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -1374,11 +1374,6 @@ Environment::Environment() : glow_hdr_luminance_cap = 12.0; glow_hdr_bleed_scale = 2.0; glow_bicubic_upscale = false; - if (VisualServer::get_singleton()->is_low_end()) { - glow_hdr_bleed_threshold = 0.9; - glow_intensity = 1.5; - glow_strength = 1.3; - } dof_blur_far_enabled = false; dof_blur_far_distance = 10;