Files
jak-project/game/graphics
water111 e30dc9ecc7 [graphics] Improve some camera math (#3825)
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.


![image](https://github.com/user-attachments/assets/4e11157f-ccf5-4f14-98a9-4a0b34da0cd2)

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>
2025-01-05 09:57:48 -05:00
..
2024-04-07 13:07:30 -04:00