diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/rasterizer_scene_gles2.cpp | 7 | ||||
-rw-r--r-- | drivers/gles3/rasterizer_scene_gles3.cpp | 4 |
2 files changed, 11 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); diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index 93a7b3e7a6..0951b8f798 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -4341,6 +4341,10 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const } } + if (probe && probe->probe_ptr->interior) { + env_radiance_tex = 0; //for rendering probe interiors, radiance must not be used. + } + state.texscreen_copied = false; glBlendEquation(GL_FUNC_ADD); |