mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-26 07:35:40 +00:00
Sutherland-Hodgeman clipping only works for planar primitives. Scud is rendering non planar quads and this breaks our algorithm a little when using the quad renderer. Stretching the near plane a few % is enough to fix it.
This commit is contained in:
parent
d711afade1
commit
6b8a29105a
|
@ -165,7 +165,7 @@ bool CNew3D::RenderScene(int priority, bool renderOverlay, Layer layer)
|
||||||
|
|
||||||
std::shared_ptr<Texture> tex1;
|
std::shared_ptr<Texture> tex1;
|
||||||
|
|
||||||
CalcViewport(&n.viewport, std::abs(m_nfPairs[priority].zNear*0.99f), std::abs(m_nfPairs[priority].zFar*1.05f)); // make planes 5% bigger
|
CalcViewport(&n.viewport, std::abs(m_nfPairs[priority].zNear*0.95f), std::abs(m_nfPairs[priority].zFar*1.05f)); // make planes 5% bigger
|
||||||
glViewport(n.viewport.x, n.viewport.y, n.viewport.width, n.viewport.height);
|
glViewport(n.viewport.x, n.viewport.y, n.viewport.width, n.viewport.height);
|
||||||
|
|
||||||
m_r3dShader.SetViewportUniforms(&n.viewport);
|
m_r3dShader.SetViewportUniforms(&n.viewport);
|
||||||
|
|
Loading…
Reference in a new issue