Skip to content

Commit

Permalink
More sky adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
dashodanger committed Nov 7, 2024
1 parent 41e1ffe commit 29f07c3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions source_files/edge/r_sky.cc
Original file line number Diff line number Diff line change
Expand Up @@ -739,16 +739,14 @@ void FinishSky(void)
if (!need_to_draw_sky)
return;

// draw sky picture, but DON'T affect the depth buffering

glDepthMask(GL_FALSE);
if (!renderer_dumb_sky.d_)
glDepthFunc(GL_ALWAYS);
else
glDepthMask(GL_FALSE);

if (draw_culling.d_)
glDisable(GL_DEPTH_TEST);

if (!renderer_dumb_sky.d_)
glDepthFunc(GL_ALWAYS);

if (custom_skybox)
RenderSkybox();
else
Expand All @@ -757,8 +755,10 @@ void FinishSky(void)
if (draw_culling.d_)
glEnable(GL_DEPTH_TEST);

glDepthFunc(GL_LEQUAL);
glDepthMask(GL_TRUE);
if (!renderer_dumb_sky.d_)
glDepthFunc(GL_LEQUAL);
else
glDepthMask(GL_TRUE);

glDisable(GL_TEXTURE_2D);
}
Expand Down

0 comments on commit 29f07c3

Please sign in to comment.