summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-03-11 14:58:09 -0300
committerJuan Linietsky <reduzio@gmail.com>2019-03-11 14:58:51 -0300
commit0eb61c3106c0498114d796ef3baa52b31084fde9 (patch)
tree9b6cb4b3fc4edd654e9b88e39d0dabbbf13bfb31 /drivers
parent7b67c5857fd7715774c7a2e07a05ff1fb7304ed1 (diff)
Undo #25557 (was not right anyway), fixes #26258
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp9
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h2
2 files changed, 3 insertions, 8 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index 0c7d8c53d4..309f8b506c 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -2349,10 +2349,6 @@ void RasterizerSceneGLES3::_add_geometry_with_material(RasterizerStorageGLES3::G
state.used_screen_texture = true;
}
- if (p_material->shader->spatial.uses_depth_texture) {
- state.used_depth_texture = true;
- }
-
if (p_depth_pass) {
if (has_blend_alpha || p_material->shader->spatial.uses_depth_texture || (has_base_alpha && p_material->shader->spatial.depth_draw_mode != RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_ALPHA_PREPASS) || p_material->shader->spatial.depth_draw_mode == RasterizerStorageGLES3::Shader::Spatial::DEPTH_DRAW_NEVER || p_material->shader->spatial.no_depth_test)
@@ -3169,7 +3165,7 @@ void RasterizerSceneGLES3::_fill_render_list(InstanceBase **p_cull_result, int p
current_material_index = 0;
state.used_sss = false;
state.used_screen_texture = false;
- state.used_depth_texture = false;
+
//fill list
for (int i = 0; i < p_cull_count; i++) {
@@ -3634,7 +3630,6 @@ void RasterizerSceneGLES3::_post_process(Environment *env, const CameraMatrix &p
if (storage->frame.current_rt->buffers.active) {
//transfer to effect buffer if using buffers, also resolve MSAA
- glReadBuffer(GL_COLOR_ATTACHMENT0);
glBindFramebuffer(GL_READ_FRAMEBUFFER, storage->frame.current_rt->buffers.fbo);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, storage->frame.current_rt->effects.mip_maps[0].sizes[0].fbo);
glBlitFramebuffer(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, 0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height, GL_COLOR_BUFFER_BIT, GL_NEAREST);
@@ -4191,7 +4186,7 @@ void RasterizerSceneGLES3::render_scene(const Transform &p_cam_transform, const
glColorMask(1, 1, 1, 1);
- if (state.used_contact_shadows || state.used_depth_texture) {
+ if (state.used_contact_shadows) {
glBindFramebuffer(GL_READ_FRAMEBUFFER, storage->frame.current_rt->buffers.fbo);
glReadBuffer(GL_COLOR_ATTACHMENT0);
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index 3ac5ade721..56e378d7fa 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -204,7 +204,7 @@ public:
bool cull_disabled;
bool used_sss;
bool used_screen_texture;
- bool used_depth_texture;
+
bool used_depth_prepass;
bool used_depth_prepass_and_resolved;