Skip to content

Commit 6718a1a

Browse files
committed
Fix lightshaft rendering with cockpits
Immediately clearing the z-buffer is definitely not a good way of saving it for later use. This fixes the lightshaft rendering (which was broken by my fix in #1282) by removing the depth buffer clear from the z-buffer restore function. The z-Buffer is cleared anyway before rendering into it so it shouldn't make a difference.
1 parent 9d7c5a2 commit 6718a1a

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

code/graphics/opengl/gropenglpostprocessing.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -599,10 +599,6 @@ void gr_opengl_post_process_restore_zbuffer()
599599
GR_DEBUG_SCOPE("Restore z-Buffer");
600600

601601
if (zbuffer_saved) {
602-
gr_zbuffer_set(GR_ZBUFF_FULL);
603-
glClear(GL_DEPTH_BUFFER_BIT);
604-
gr_zbuffer_set(GR_ZBUFF_NONE);
605-
606602
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, Scene_depth_texture, 0);
607603

608604
zbuffer_saved = false;

0 commit comments

Comments
 (0)