1
0
forked from 0ad/0ad

Disable back-face culling when rendering the Sides of the map, preventing a graphical artifact at the edge of water maps.

By rendering sides even when they are back-facing, the water shader is
on top of a mesh instead of emptiness and this solves an old
"edge-of-map" graphical issue.

Taken out from D359 with vlad's agreement. See screenshots there for
more information on the exact issue.

This was SVN commit r22007.
This commit is contained in:
wraitii 2019-01-02 15:32:19 +00:00
parent 9903fd8a6c
commit 38c096896b

View File

@ -1227,6 +1227,8 @@ void CPatchRData::RenderSides(CShaderProgramPtr& shader)
if (!m_VBSides)
return;
glDisable(GL_CULL_FACE);
SSideVertex *base = (SSideVertex *)m_VBSides->m_Owner->Bind();
// setup data pointers
@ -1243,6 +1245,8 @@ void CPatchRData::RenderSides(CShaderProgramPtr& shader)
g_Renderer.m_Stats.m_TerrainTris += m_VBSides->m_Count - 2;
CVertexBuffer::Unbind();
glEnable(GL_CULL_FACE);
}
void CPatchRData::RenderPriorities(CTextRenderer& textRenderer)