diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-09-07 20:45:37 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-09-07 20:45:37 -0300 |
commit | 5ca3af337144209024e36b4bc4843f2c3bb067f1 (patch) | |
tree | b6ed8db40ceda3a058c0b4dfa86113aa1ef3101f /drivers | |
parent | c023a132d0a1ed0979aa94985257cf0568f44508 (diff) |
Ability to use a sky for reflection together with a background color.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/rasterizer_scene_gles3.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index ad127c40de..146a2359b6 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -4165,7 +4165,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const clear_color = env->bg_color.to_linear(); storage->frame.clear_request = false; - } else if (env->bg_mode == VS::ENV_BG_SKY) { + } else if (env->bg_mode == VS::ENV_BG_SKY || env->bg_mode == VS::ENV_BG_COLOR_SKY) { sky = storage->sky_owner.getornull(env->sky); @@ -4173,6 +4173,9 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const env_radiance_tex = sky->radiance; } storage->frame.clear_request = false; + if (env->bg_mode == VS::ENV_BG_COLOR_SKY) { + clear_color = env->bg_color.to_linear(); + } } else { storage->frame.clear_request = false; |