Skip to content

Commit d873936

Browse files
committed
Fix #783
1 parent 9608e21 commit d873936

2 files changed

Lines changed: 5 additions & 19 deletions

File tree

Plugins/Renderer/gl_rmain.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3199,7 +3199,6 @@ void R_PreRenderView()
31993199

32003200
glDepthFunc(GL_LEQUAL);
32013201
glDepthRange(0, 1);
3202-
glClipControl(GL_LOWER_LEFT, GL_ZERO_TO_ONE);
32033202

32043203
for (const auto& cb : g_RenderCallbacks)
32053204
{

Plugins/Renderer/gl_wsurf.cpp

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,6 +2608,7 @@ void R_DrawSkyBox(void)
26082608

26092609
GL_EndDebugGroup();
26102610
}
2611+
26112612
void R_DrawWorldSurfaceModelShadowProxyMesh(CWorldSurfaceShadowProxyModel* pShadowProxyModel, CWorldSurfaceShadowProxyDraw* pShadowProxyDraw)
26122613
{
26132614
GL_BeginDebugGroup("R_DrawWorldSurfaceModelShadowProxyMesh");
@@ -3539,15 +3540,12 @@ void R_DrawWorldSurfaceModel(const std::shared_ptr<CWorldSurfaceModel>& pModel,
35393540
pLeaf = g_WorldSurfaceRenderer.pCurrentWorldLeaf.lock();
35403541
}
35413542

3542-
//Always draw skybox before world, when rendering water view
3543-
if (R_IsRenderingWaterView())
3543+
//Always draw skybox before world
3544+
if (pLeaf)
35443545
{
3545-
if (pLeaf)
3546+
if (R_WorldSurfaceLeafHasSky(pModel.get(), pLeaf.get()))
35463547
{
3547-
if (R_WorldSurfaceLeafHasSky(pModel.get(), pLeaf.get()))
3548-
{
3549-
R_DrawSkyBox();
3550-
}
3548+
R_DrawSkyBox();
35513549
}
35523550
}
35533551

@@ -3605,17 +3603,6 @@ void R_DrawWorldSurfaceModel(const std::shared_ptr<CWorldSurfaceModel>& pModel,
36053603
g_WorldSurfaceRenderer.pCurrentWorldLeaf = pLeaf;
36063604
}
36073605
}
3608-
3609-
if (!R_IsRenderingWaterView())
3610-
{
3611-
if (pLeaf)
3612-
{
3613-
if (R_WorldSurfaceLeafHasSky(pModel.get(), pLeaf.get()))
3614-
{
3615-
R_DrawSkyBox();
3616-
}
3617-
}
3618-
}
36193606
}
36203607
else
36213608
{

0 commit comments

Comments
 (0)