From 2534e289184b5e43bc5bf1b2a3d598d667c740de Mon Sep 17 00:00:00 2001 From: clayjohn Date: Mon, 20 Jul 2020 20:06:37 -0700 Subject: [PATCH] Fix OpenGL error when generating radiance --- drivers/gles3/rasterizer_storage_gles3.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index 6f76dd013f8..823aaa2f551 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -2177,7 +2177,7 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra } glBindFramebuffer(GL_DRAW_FRAMEBUFFER, tmp_fb); - glFramebufferTextureLayer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, sky->radiance, 0, lod); + glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, sky->radiance, lod); glBindFramebuffer(GL_READ_FRAMEBUFFER, tmp_fb2); glReadBuffer(GL_COLOR_ATTACHMENT0); glBlitFramebuffer(0, 0, size, size * 2, 0, 0, size, size * 2, GL_COLOR_BUFFER_BIT, GL_NEAREST);