mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2024-11-25 23:25:40 +00:00
Opaque polys definitely depth test with less than or equal. Virtua striker is drawing co-planar polys for the bar gfx
This commit is contained in:
parent
c7ffd0a808
commit
f9be1259c0
|
@ -267,7 +267,7 @@ void CNew3D::SetRenderStates()
|
|||
glVertexAttribPointer(m_r3dShader.GetVertexAttribPos("inFaceNormal"), 3, GL_FLOAT, GL_FALSE, sizeof(FVertex), (void*)offsetof(FVertex, faceNormal));
|
||||
glVertexAttribPointer(m_r3dShader.GetVertexAttribPos("inFixedShade"), 1, GL_FLOAT, GL_FALSE, sizeof(FVertex), (void*)offsetof(FVertex, fixedShade));
|
||||
|
||||
glDepthFunc (GL_LESS);
|
||||
glDepthFunc (GL_LEQUAL);
|
||||
glEnable (GL_DEPTH_TEST);
|
||||
glDepthMask (GL_TRUE);
|
||||
glActiveTexture (GL_TEXTURE0);
|
||||
|
@ -354,6 +354,8 @@ void CNew3D::RenderFrame(void)
|
|||
m_r3dFrameBuffers.SetFBO(Layer::colour);
|
||||
hasOverlay = RenderScene(pri, renderOverlay, Layer::colour);
|
||||
|
||||
glDepthFunc(GL_LESS); // alpha polys seem to use gl_less (ocean hunter)
|
||||
|
||||
m_r3dShader.DiscardAlpha(false); // render only translucent pixels
|
||||
m_r3dFrameBuffers.StoreDepth(); // save depth buffer for 1st trans pass
|
||||
m_r3dFrameBuffers.SetFBO(Layer::trans1);
|
||||
|
|
Loading…
Reference in a new issue