Opened 8 weeks ago

Last modified 8 weeks ago

#15271 new defect

TINYGL: glPolygonStipple seems to work when looking at one side only

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

Description

When using the combination between polygon stipple and polygon offset in the Freescape games (which is used to create the patterns): the triangles tend to be invisible, when you change the perspective a little bit. But there is something else, that is curious. In a symmetrical room, one side looks good and the other looks broken. (check the screenshots). Reversing the perspective changes the sides, so it looks like the rendering is correct is always in the same side so I suspect this is an issue in TinyGL since the same code works fine for OpenGL/shaders.

Attachments (2)

scummvm-driller-zx-00007.webp (40.8 KB ) - added by neuromancer 8 weeks ago.
scummvm-driller-zx-00006.webp (48.1 KB ) - added by neuromancer 8 weeks ago.

Download all attachments as: .zip

Change History (3)

by neuromancer, 8 weeks ago

by neuromancer, 8 weeks ago

comment:1 by neuromancer, 8 weeks ago

Something else that was proposed for this issue in Discord:

do you think it could be because there is a missing statement that updates the zbuffer in FrameBuffer::fillTriangle ?
Perhaps in the update_right branch? There is an update to the zbuffer in update_left, but nothing in the other branch: https://github.com/scummvm/scummvm/blob/494ec37f20e3560d5e82829612086262401720e2/graphics/tinygl/ztriangle.cpp#L380-L444

Note: See TracTickets for help on using tickets.