mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
OpenXR - Gran Turismo projection hack
This commit is contained in:
parent
39966730e9
commit
e76a5b1d3d
@ -811,7 +811,9 @@ void UpdateVRParams(float* projMatrix) {
|
||||
void UpdateVRProjection(float* projMatrix, float* leftEye, float* rightEye) {
|
||||
float output[16];
|
||||
for (int i = 0; i < 16; i++) {
|
||||
if (fabs(projMatrix[i]) > 0) {
|
||||
if (PSP_CoreParameter().compat.vrCompat().ProjectionHack && ((i == 8) || (i == 9))) {
|
||||
output[i] = 0;
|
||||
} else if (fabs(projMatrix[i]) > 0) {
|
||||
output[i] = vrMatrix[VR_PROJECTION_MATRIX][i];
|
||||
if ((output[i] > 0) != (projMatrix[i] > 0)) {
|
||||
output[i] *= -1.0f;
|
||||
|
@ -145,6 +145,7 @@ void Compatibility::CheckVRSettings(IniFile &iniFile, const std::string &gameID)
|
||||
CheckSetting(iniFile, gameID, "ForceMono", &vrCompat_.ForceMono);
|
||||
CheckSetting(iniFile, gameID, "IdentityViewHack", &vrCompat_.IdentityViewHack);
|
||||
CheckSetting(iniFile, gameID, "MirroringVariant", &vrCompat_.MirroringVariant);
|
||||
CheckSetting(iniFile, gameID, "ProjectionHack", &vrCompat_.ProjectionHack);
|
||||
CheckSetting(iniFile, gameID, "Skyplane", &vrCompat_.Skyplane);
|
||||
CheckSetting(iniFile, gameID, "UnitsPerMeter", &vrCompat_.UnitsPerMeter);
|
||||
|
||||
|
@ -115,6 +115,7 @@ struct VRCompat {
|
||||
bool ForceFlatScreen;
|
||||
bool IdentityViewHack;
|
||||
int MirroringVariant;
|
||||
bool ProjectionHack;
|
||||
bool Skyplane;
|
||||
float UnitsPerMeter;
|
||||
};
|
||||
|
@ -110,6 +110,17 @@ ULES00035 = 3
|
||||
ULUS10014 = 3
|
||||
|
||||
|
||||
[ProjectionHack]
|
||||
# Forces ignoring of projection matrix pivot point.
|
||||
|
||||
# Gran Turismo: The Real Driving Simulator
|
||||
NPJG00027 = true
|
||||
UCAS40265 = true
|
||||
UCES01245 = true
|
||||
UCJS10100 = true
|
||||
UCUS98632 = true
|
||||
|
||||
|
||||
[Skyplane]
|
||||
# Workaround to remove the background skyplane and add clearing framebuffer with a fog color.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user