mirror of
https://github.com/libretro/Play-.git
synced 2024-12-04 15:26:23 +00:00
Removed "fix small Z values" setting.
Not a proper fix for the issues some games have.
This commit is contained in:
parent
efb08e9f5c
commit
a8b125fe4d
@ -41,7 +41,6 @@ CGSH_OpenGL::CGSH_OpenGL()
|
||||
: m_pCvtBuffer(nullptr)
|
||||
{
|
||||
CAppConfig::GetInstance().RegisterPreferenceBoolean(PREF_CGSH_OPENGL_FORCEBILINEARTEXTURES, false);
|
||||
CAppConfig::GetInstance().RegisterPreferenceBoolean(PREF_CGSH_OPENGL_FIXSMALLZVALUES, false);
|
||||
|
||||
LoadSettings();
|
||||
|
||||
@ -280,7 +279,6 @@ void CGSH_OpenGL::LoadState(Framework::CZipArchiveReader& archive)
|
||||
void CGSH_OpenGL::LoadSettings()
|
||||
{
|
||||
m_forceBilinearTextures = CAppConfig::GetInstance().GetPreferenceBoolean(PREF_CGSH_OPENGL_FORCEBILINEARTEXTURES);
|
||||
m_fixSmallZValues = CAppConfig::GetInstance().GetPreferenceBoolean(PREF_CGSH_OPENGL_FIXSMALLZVALUES);
|
||||
}
|
||||
|
||||
void CGSH_OpenGL::InitializeRC()
|
||||
@ -430,18 +428,10 @@ float CGSH_OpenGL::GetZ(float nZ)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(m_fixSmallZValues && (nZ < 256))
|
||||
{
|
||||
//The number is small, so scale to a smaller ratio (65536)
|
||||
return (nZ - 32768.0f) / 32768.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
nZ -= m_nMaxZ;
|
||||
if(nZ > m_nMaxZ) return 1.0;
|
||||
if(nZ < -m_nMaxZ) return -1.0;
|
||||
return nZ / m_nMaxZ;
|
||||
}
|
||||
nZ -= m_nMaxZ;
|
||||
if(nZ > m_nMaxZ) return 1.0;
|
||||
if(nZ < -m_nMaxZ) return -1.0;
|
||||
return nZ / m_nMaxZ;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
@ -10,7 +10,6 @@
|
||||
#include "opengl/Resource.h"
|
||||
|
||||
#define PREF_CGSH_OPENGL_FORCEBILINEARTEXTURES "renderer.opengl.forcebilineartextures"
|
||||
#define PREF_CGSH_OPENGL_FIXSMALLZVALUES "renderer.opengl.fixsmallzvalues"
|
||||
|
||||
class CGSH_OpenGL : public CGSHandler
|
||||
{
|
||||
@ -312,7 +311,6 @@ private:
|
||||
float m_nMaxZ;
|
||||
|
||||
bool m_forceBilinearTextures = false;
|
||||
bool m_fixSmallZValues = false;
|
||||
|
||||
uint8* m_pCvtBuffer;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user