OpenTomb icon indicating copy to clipboard operation
OpenTomb copied to clipboard

Partial texture clipping

Open vvs- opened this issue 9 years ago • 6 comments

In some areas objects may share the space between its' polygons and surrounding room geometry. Thus it may occlude textures of such objects. One example can be seen in Caves setEntityPos(player,16791,87115,-8960,214,0,0). On a sufficient distance takes place visible flickering apparently caused by Z-fighting. This wasn't so obvious in the original game where camera didn't move during breath animation.

vvs- avatar Jun 05 '15 12:06 vvs-

Another instance of apparent Z-fighting. It's visible only at a certain distance and angle. Note that it might depend on a particular driver and anti-aliasing settings. screen_00001

vvs- avatar Dec 01 '16 12:12 vvs-

Looks like the above grid Z-fighting was fixed for some reason. The only commit to suspect is 25c0de08aebb23b6307bacf0fdae0bd3414be3a3, but I don't see why it should affect it. The original textures' Z-fighting is still present, of course.

Or it could be a coincidence. I've just updated some graphics related libraries 😉

vvs- avatar Dec 05 '16 18:12 vvs-

Bisecting shows that it was in fact commit 1303ca6089c6c1e72d0658568056a7a61101ba0d. Weird.

vvs- avatar Dec 05 '16 19:12 vvs-

Those grid Z-fighting patterns actually correspond to wireframe patterns combined with frustum clipping. So, it's related to #65 too. Notice, how a change in the camera angle brings new patterns into frustum (bottom part of the picture): screen_00000 screen_00001

vvs- avatar Dec 07 '16 20:12 vvs-

@vvs- Just wanted to say, big thanks to your contributions to the project as a tester documenting bugs etc, it's awesome! Keep it up :)

Gh0stBlade avatar Dec 07 '16 22:12 Gh0stBlade

Thanks. Apparently I have just too much spare time. 😔 At least somebody else can find something useful in my everyday disclosures.

vvs- avatar Dec 07 '16 22:12 vvs-