Fix T99606: Regression: TexCoordinate losing precision far away from origin

Same root cause as T99128. The fix also needed to be done in another place.
This commit is contained in:
Clément Foucault
2022-07-15 11:15:59 +02:00
parent 98f688ac42
commit f4d7ea2cf6

View File

@@ -97,7 +97,7 @@ GlobalData init_globals(void)
GlobalData surf;
# if defined(WORLD_BACKGROUND) || defined(PROBE_CAPTURE)
surf.P = -cameraVec(worldPosition);
surf.P = transform_direction(ViewMatrixInverse, viewCameraVec(viewPosition));
surf.N = surf.Ng = -surf.P;
surf.ray_length = 0.0;
# else