summaryrefslogtreecommitdiff
path: root/drivers/gles2
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gles2')
-rw-r--r--drivers/gles2/rasterizer_scene_gles2.cpp5
-rw-r--r--drivers/gles2/rasterizer_storage_gles2.cpp6
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp
index 9530ed08c9..61bcfff419 100644
--- a/drivers/gles2/rasterizer_scene_gles2.cpp
+++ b/drivers/gles2/rasterizer_scene_gles2.cpp
@@ -3509,6 +3509,11 @@ void RasterizerSceneGLES2::render_scene(const Transform &p_cam_transform, const
_render_render_list(&render_list.elements[render_list.max_elements - render_list.alpha_element_count], render_list.alpha_element_count, cam_transform, p_cam_projection, p_shadow_atlas, env, env_radiance_tex, 0.0, 0.0, reverse_cull, true, false);
+ if (p_reflection_probe.is_valid()) {
+ // Rendering to a probe so no need for post_processing
+ return;
+ }
+
//post process
_post_process(env, p_cam_projection);
diff --git a/drivers/gles2/rasterizer_storage_gles2.cpp b/drivers/gles2/rasterizer_storage_gles2.cpp
index 1584295b4c..6faf76e395 100644
--- a/drivers/gles2/rasterizer_storage_gles2.cpp
+++ b/drivers/gles2/rasterizer_storage_gles2.cpp
@@ -1482,8 +1482,9 @@ void RasterizerStorageGLES2::_update_shader(Shader *p_shader) const {
}
Error err = shaders.compiler.compile(p_shader->mode, p_shader->code, actions, p_shader->path, gen_code);
-
- ERR_FAIL_COND(err != OK);
+ if (err != OK) {
+ return;
+ }
p_shader->shader->set_custom_shader_code(p_shader->custom_code_id, gen_code.vertex, gen_code.vertex_global, gen_code.fragment, gen_code.light, gen_code.fragment_global, gen_code.uniforms, gen_code.texture_uniforms, gen_code.custom_defines);
@@ -4886,7 +4887,6 @@ void RasterizerStorageGLES2::_render_target_allocate(RenderTarget *rt) {
}
glClearColor(1.0, 0.0, 1.0, 0.0);
- glViewport(0, 0, rt->mip_maps[i].sizes[j].width, rt->mip_maps[i].sizes[j].height);
glClear(GL_COLOR_BUFFER_BIT);
if (used_depth) {
glClearDepth(1.0);