summaryrefslogtreecommitdiff
path: root/src/os
diff options
context:
space:
mode:
authorcoco875 <59367621+coco875@users.noreply.github.com>2024-09-11 00:20:55 +0200
committerGitHub <noreply@github.com>2024-09-10 16:20:55 -0600
commitb36b9e318095e0ae5fc720319a55418d9aa5a4c3 (patch)
tree1f0b6e5784ba248722a86c464cf32dd9f4a1518e /src/os
parent47e95c0e182ed21486648d88e2ce52aa05d2fe7c (diff)
[enhancement] Disable Culling (#58)
* less intrusif possible way to disable culling * forget cloud and star * some change and add gFarFrustrum * reduce range of gFarFrustrum * minor rename of a CVar --------- Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/os')
-rw-r--r--src/os/guPerspectiveF.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/os/guPerspectiveF.c b/src/os/guPerspectiveF.c
index 1a6150a68..062d42751 100644
--- a/src/os/guPerspectiveF.c
+++ b/src/os/guPerspectiveF.c
@@ -4,6 +4,9 @@ void guPerspectiveF(float mf[4][4], u16* perspNorm, float fovy, float aspect, fl
float yscale;
int row;
int col;
+ if (CVarGetInteger("gNoCulling", 0)) {
+ far = CVarGetFloat("gFarFrustrum", 10000.0f);
+ }
guMtxIdentF(mf);
fovy *= GU_PI / 180.0;
yscale = cosf(fovy / 2) / sinf(fovy / 2);