summaryrefslogtreecommitdiff
path: root/drivers/gles3/storage
diff options
context:
space:
mode:
authorclayjohn <claynjohn@gmail.com>2022-09-06 14:42:08 -0700
committerclayjohn <claynjohn@gmail.com>2022-09-06 14:42:08 -0700
commitfea48cdfc6d434bf3b07ee08f1a466d798fc12d3 (patch)
tree2b9a65a05a28f90bb3eac81a91d82280ab713fa6 /drivers/gles3/storage
parent5628ab9215d61fc2b7223b465626873368aaf66b (diff)
Fix rendering when using WebGL2.
Fixes include using proper depth buffer format in 3D (this had previously been fixed already but the changes were lost in a rebase), Remove unused lighting and shadowing code in 2D, and update 2D UBOs using glBufferSubData so that they remain the appropriate size.
Diffstat (limited to 'drivers/gles3/storage')
-rw-r--r--drivers/gles3/storage/render_scene_buffers_gles3.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles3/storage/render_scene_buffers_gles3.cpp b/drivers/gles3/storage/render_scene_buffers_gles3.cpp
index 5d121e2ef9..9123984dc7 100644
--- a/drivers/gles3/storage/render_scene_buffers_gles3.cpp
+++ b/drivers/gles3/storage/render_scene_buffers_gles3.cpp
@@ -68,7 +68,7 @@ void RenderSceneBuffersGLES3::configure(RID p_render_target, const Size2i p_inte
glGenTextures(1, &depth_texture);
glBindTexture(GL_TEXTURE_2D, depth_texture);
- glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, rt->size.x, rt->size.y, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT24, rt->size.x, rt->size.y, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, nullptr);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);