Opened 12 hours ago

#15486 new defect

TINYGL: triangles always override zbuffer from lines?

Reported by: neuromancer Owned by:
Priority: normal Component: Graphics
Version: Keywords:
Cc: Game:

Description

It seems that when using TinyGL, rendering a line on top of a triangle can cause the line to be invisible, depending on the order of the rendering calls. In theory, the rendering order should not matter when depth testing/writing is enabled.
This can be reproduced in the freescape engine, removing workaround for this issue located here: https://github.com/scummvm/scummvm/compare/638af45da0ad...79f7d38f3694#diff-be1a69b059b2d0790b564279ad27cce15d58d9dfe2e7d9d6e9ef7c81c5f5c0f4R362-R373

To reproduce, modify the the affected code to render first planar, then non-planar objects:

	for (auto &pair : offsetMap) {
		pair._key->draw(gfx, pair._value);
	}

	for (auto &obj : nonPlanarObjects) {
		obj->draw(gfx);
	}

Then, load the Total Eclipse CPC demo (https://downloads.scummvm.org/frs/demos/freescape/totaleclipse-cpc-demo.zip), switch the render to software, start the game and examine the plane from different angles.

I have attached two images with and without the workaround.

Attachments (2)

scummvm-totaleclipse-demo-cpc-00001.png (43.6 KB ) - added by neuromancer 12 hours ago.
scummvm-totaleclipse-demo-cpc-00000.png (43.4 KB ) - added by neuromancer 12 hours ago.

Download all attachments as: .zip

Change History (2)

by neuromancer, 12 hours ago

by neuromancer, 12 hours ago

Note: See TracTickets for help on using tickets.