Fix OpenGL error when generating radiance

This commit is contained in:
clayjohn 2020-07-20 20:06:37 -07:00
parent c79ec3951b
commit 2534e28918
1 changed files with 1 additions and 1 deletions

View File

@ -2177,7 +2177,7 @@ void RasterizerStorageGLES3::sky_set_texture(RID p_sky, RID p_panorama, int p_ra
} }
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, tmp_fb); 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); glBindFramebuffer(GL_READ_FRAMEBUFFER, tmp_fb2);
glReadBuffer(GL_COLOR_ATTACHMENT0); glReadBuffer(GL_COLOR_ATTACHMENT0);
glBlitFramebuffer(0, 0, size, size * 2, 0, 0, size, size * 2, GL_COLOR_BUFFER_BIT, GL_NEAREST); glBlitFramebuffer(0, 0, size, size * 2, 0, 0, size, size * 2, GL_COLOR_BUFFER_BIT, GL_NEAREST);