Update shaders_deferred_render.c for GLES3

This commit is contained in:
MikiZX1 2025-01-18 15:58:08 +01:00 committed by GitHub
parent 394cf928e2
commit f4d2428e52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -294,12 +294,12 @@ int main(void)
rlEnableColorBlend(); rlEnableColorBlend();
EndMode3D(); EndMode3D();
#ifdef PLATFORM_DESKTOP //#ifdef PLATFORM_DESKTOP
// As a last step, we now copy over the depth buffer from our g-buffer to the default framebuffer. // As a last step, we now copy over the depth buffer from our g-buffer to the default framebuffer.
rlBindFramebuffer(RL_READ_FRAMEBUFFER, gBuffer.framebuffer); rlBindFramebuffer(RL_READ_FRAMEBUFFER, gBuffer.framebuffer);
rlBindFramebuffer(RL_DRAW_FRAMEBUFFER, 0); rlBindFramebuffer(RL_DRAW_FRAMEBUFFER, 0);
rlBlitFramebuffer(0, 0, screenWidth, screenHeight, 0, 0, screenWidth, screenHeight, 0x00000100); // GL_DEPTH_BUFFER_BIT rlBlitFramebuffer(0, 0, screenWidth, screenHeight, 0, 0, screenWidth, screenHeight, 0x00000100); // GL_DEPTH_BUFFER_BIT
#endif //#endif
rlDisableFramebuffer(); rlDisableFramebuffer();
// Since our shader is now done and disabled, we can draw spheres // Since our shader is now done and disabled, we can draw spheres