OpenLara icon indicating copy to clipboard operation
OpenLara copied to clipboard

Z-fighting bug

Open vvs- opened this issue 5 years ago • 10 comments

There should be leaves on the wall in a big room with wolves and timed doors in Caves. Due to z-fighting there is a wall texture instead. This is almost the same as in corresponding OpenTomb bug (but it flickers there).

BTW in OT there used to be z-fighting problems in Lost Valley too. I didn't check it yet because it's hard to fight all those baddies there (T-Rex). Are there any means that could help to make Lara invincible or eliminate all enemies altogether? OT has excellent debugging aids for such tasks of which OL would benefit too.

vvs- avatar Sep 23 '19 15:09 vvs-

you can use O key for DOZY mode in OL

XProger avatar Sep 23 '19 16:09 XProger

Thanks for the suggestion. I think there is the same bug in Lost Valley but to be sure I must complete those levels in original TR too which doesn't have such cheats.

Here is screenshot from original TR in Caves. To be fair there is z-fighting even there but it's not so obvious. tomb_001

vvs- avatar Sep 23 '19 17:09 vvs-

Yes, there is the same z-fighting bug in Lost Valley and there is no sign of it in the original engine. tomb_000

vvs- avatar Sep 24 '19 16:09 vvs-

It's content problem, the original game doesn't use z-buffer, TombATI and Android/iOS ports has the same z-fighting bugs... so I don't know how I can fix it.

XProger avatar Sep 25 '19 22:09 XProger

Where is it exactly in the Lost Valley level? Can you give the camera coordinates?

Thanks.

Popov72 avatar Sep 26 '19 06:09 Popov72

It's under the broken bridge to one of the cogs, near T-Rex.

vvs- avatar Sep 26 '19 12:09 vvs-

@XProger understood. But what if you give some textures more priority? That way wall and floor textures will only be rendered if there is no z-fighting there.

vvs- avatar Sep 26 '19 12:09 vvs-

It'll be looking weird, because in bridge parts case they are really under ground level

XProger avatar Sep 26 '19 12:09 XProger

Using appropriate zbias should do it (PolygonOffset in openGL).

Popov72 avatar Sep 26 '19 12:09 Popov72

Also, run-time patching could do wonders :smile:

vvs- avatar Sep 26 '19 13:09 vvs-