summaryrefslogtreecommitdiffstats
path: root/drivers/gles3/rasterizer_scene_gles3.h
diff options
context:
space:
mode:
authorDaniel Rakos <daniel.rakos@rastergrid.com>2019-03-22 11:09:23 +0100
committerDaniel Rakos <daniel.rakos@rastergrid.com>2019-03-26 17:48:22 +0100
commit849596c40c49a6d9b5437b60264261e4b1e97bcd (patch)
treed54bfcd3323dc145a8f2dcb7e3d236003886427f /drivers/gles3/rasterizer_scene_gles3.h
parent81292665d5dcc991d3c9341245b269193329ee22 (diff)
downloadredot-engine-849596c40c49a6d9b5437b60264261e4b1e97bcd.tar.gz
Fixed handling of depth texture so it's resolved and bound when needed
- Cleaned up and improved the code determining when we need to use a depth prepass (previously it wasn't executed in certain cases even if it was needed) - Added code to prepare and bind the depth texture even when no depth prepass or MRTs (more precisely effect buffers) are used Fixes #25870, #25535, and #25387.
Diffstat (limited to 'drivers/gles3/rasterizer_scene_gles3.h')
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index 56e378d7fa..59e23e5ac9 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -206,7 +206,10 @@ public:
bool used_screen_texture;
bool used_depth_prepass;
- bool used_depth_prepass_and_resolved;
+
+ bool used_depth_texture;
+ bool prepared_depth_texture;
+ bool bound_depth_texture;
VS::ViewportDebugDraw debug_draw;
} state;
@@ -848,6 +851,9 @@ public:
void _render_mrts(Environment *env, const CameraMatrix &p_cam_projection);
void _post_process(Environment *env, const CameraMatrix &p_cam_projection);
+ void _prepare_depth_texture();
+ void _bind_depth_texture();
+
virtual void render_scene(const Transform &p_cam_transform, const CameraMatrix &p_cam_projection, bool p_cam_ortogonal, InstanceBase **p_cull_result, int p_cull_count, RID *p_light_cull_result, int p_light_cull_count, RID *p_reflection_probe_cull_result, int p_reflection_probe_cull_count, RID p_environment, RID p_shadow_atlas, RID p_reflection_atlas, RID p_reflection_probe, int p_reflection_probe_pass);
virtual void render_shadow(RID p_light, RID p_shadow_atlas, int p_pass, InstanceBase **p_cull_result, int p_cull_count);
virtual bool free(RID p_rid);