diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-11-16 11:45:50 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2018-11-16 11:46:21 -0300 |
commit | e77afb85072a7bea10075221b9a24abd442e1318 (patch) | |
tree | 8581c3a68be2b3145fa1b175cdbe7cc46d3b8f32 /drivers/gles2 | |
parent | 5d00407388362b257e35fe9df96a5b790533165e (diff) |
Ensure environment radiance is not used on refprobe interiors, fixes #17868
Diffstat (limited to 'drivers/gles2')
-rw-r--r-- | drivers/gles2/rasterizer_scene_gles2.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index 2c2dea3535..0c0bf56793 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -2497,6 +2497,7 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const Environment *env = NULL; int viewport_width, viewport_height; + bool probe_interior = false; if (p_reflection_probe.is_valid()) { ReflectionProbeInstance *probe = reflection_probe_instance_owner.getornull(p_reflection_probe); @@ -2514,6 +2515,8 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const viewport_width = probe->probe_ptr->resolution; viewport_height = probe->probe_ptr->resolution; + probe_interior = probe->probe_ptr->interior; + } else { state.render_no_shadows = false; current_fb = storage->frame.current_rt->fbo; @@ -2624,6 +2627,10 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const } } + if (probe_interior) { + env_radiance_tex = 0; //do not use radiance texture on interiors + } + // render opaque things first render_list.sort_by_key(false); _render_render_list(render_list.elements, render_list.element_count, p_cam_transform, p_cam_projection, p_shadow_atlas, env, env_radiance_tex, 0.0, 0.0, false, false, false); |