Merge pull request #38056 from clayjohn/GLES2-depth-buffer

Use proper depth buffer format for rgba shadows
This commit is contained in:
Rémi Verschelde 2020-04-20 23:47:24 +02:00 committed by GitHub
commit b4855f5c83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4045,7 +4045,7 @@ void RasterizerSceneGLES2::initialize() {
//maximum compatibility, renderbuffer and RGBA shadow
glGenRenderbuffers(1, &directional_shadow.depth);
glBindRenderbuffer(GL_RENDERBUFFER, directional_shadow.depth);
glRenderbufferStorage(GL_RENDERBUFFER, storage->config.depth_internalformat, directional_shadow.size, directional_shadow.size);
glRenderbufferStorage(GL_RENDERBUFFER, storage->config.depth_buffer_internalformat, directional_shadow.size, directional_shadow.size);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, directional_shadow.depth);
glGenTextures(1, &directional_shadow.color);