OpenTomb
OpenTomb copied to clipboard
Early frustum clipping
It seems that clipping happens too early. See for example setgamef(4,6)
setEntityPos(player,27242,29836,0,16,0,0)
, then try to rotate camera to the left. Also, try to jump straight up.
Could it be related to #40?
I have a feeling that frustum angle is determined by the Lara position and not the camera.
Another example, but this time in TR1:
That yellow room above Lara should not be visible.
I guess it belongs here:
In Obelisk of Khamoon:
Happens after pulling switch 45.
I can't seem to reproduce this, is this still happening on the current builds?
I can still reproduce everything except one.
EDIT: As it turned out the last example can be reproduced on a debug optimization level.
When running straight from that position I've got a total blackout.
The first case described above (and many others) manifests itself where only vertical frustums exists. Even when there should be line of vision above them (i.e. horizontal frustum), actually it doesn't exist from the engine point of view. When that vertical frustum is moved out of sight, everything above it suddenly disappear, e.g. top of buildings.
And yet another case. Looks like it appeared only after recent changes:
Visibility problems are countless. Most times it's a wrong room in frustum. But sometimes there is nothing rendered at all: just Lara in the center of a black screen.
Another example of wrong culling of a room at the top by just moving slightly.
Visibility issues in TR2 are quite bad. There are instances when camera lose its room and you see a black screen. The only way to correct this is to use freelook/noclip.
After recent camera and overlapping rooms fixes there are still many old visibility problems present: