mirror of
https://github.com/open-goal/jak-project
synced 2026-05-24 23:22:14 -04:00
e30dc9ecc7
I finally went through and worked out the math for the camera matrix, and improved how it works for PC rendering. I was able to finally avoid the double perspective divide issue, which I always thought would cause accuracy issues. This will help tfrag, tie (no envmap), shrub, and hfrag have less z-fighting in cases where the camera and the thing you're looking at are pretty close, but the entire level is far from the origin - like jak 3 temple. I was able to modify the camera matrix so we don't have to do all the weird scaling/addition in the shader. Here's a screenshot from the temple oracle checkpoint, cropped from 4k. This used to have a lot of fighting issues.  It doesn't help issues where the thing you're looking at is very far away (jak 1 mountains, some jak 2 city stuff). It also doesn't help with jak's skirt/scarf, since those use a different renderer. There's definitely more to do here, but this is a good starting point and proof that I can at least figure out the math. Co-authored-by: water111 <awaterford1111445@gmail.com>