mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: fix z-fighting properly
The near clip plane has been increased significantly. This was never adjusted correctly with the large scale change that was done to make Recast work with the scale of Titanfall and Apex maps. The near clipping is still minimal but the z-fighting problem has been fixed entirely. The offset for Recast and Detour debug drawing have also been reduced significantly as a result, since they no longer need to be offset that much. Also removed a comment regarding the projection matrix since we have to adjust the projection matric for XYZ rendering.
This commit is contained in:
parent
71ac40cbe5
commit
2db0f40ec1
@ -82,8 +82,8 @@ Editor::Editor() :
|
||||
for (int i = 0; i < MAX_TOOLS; i++)
|
||||
m_toolStates[i] = 0;
|
||||
|
||||
dtVset(m_recastDrawOffset, 0.0f,0.0f,20.0f);
|
||||
dtVset(m_detourDrawOffset, 0.0f,0.0f,30.0f);
|
||||
dtVset(m_recastDrawOffset, 0.0f,0.0f,4.0f);
|
||||
dtVset(m_detourDrawOffset, 0.0f,0.0f,8.0f);
|
||||
}
|
||||
|
||||
Editor::~Editor()
|
||||
|
@ -820,7 +820,7 @@ int not_main(int argc, char** argv)
|
||||
// Compute the projection matrix.
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gluPerspective(75.0f, (float)width/(float)height, 1.0f, camr);
|
||||
gluPerspective(85.0f, (float)width/(float)height, 25.0f, camr);
|
||||
GLdouble projectionMatrix[16];
|
||||
glGetDoublev(GL_PROJECTION_MATRIX, projectionMatrix);
|
||||
|
||||
@ -832,7 +832,7 @@ int not_main(int argc, char** argv)
|
||||
const float mXZY_to_XYZ[16] =
|
||||
{
|
||||
1,0,0,0,
|
||||
0,0,-1,0, //tbh not sure why this is needed, the tri flips again? something is very stupid...
|
||||
0,0,-1,0,
|
||||
0,1,0,0,
|
||||
0,0,0,1
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user