citro2d icon indicating copy to clipboard operation
citro2d copied to clipboard

Reorder quad vertices

Open jtothebell opened this issue 3 years ago • 2 comments

Fixes #40 . Credit Antoine for the fix and @DPS2004 for finding and reporting original issue.

jtothebell avatar Mar 29 '22 23:03 jtothebell

All this does is changing the diagonal by which the quad is split into two triangles. In theory, both ways to split the quad should result in equivalent rendering. Are you sure you don't have other issues such as Z-fighting, or data races that affect when your texture is being read by the GPU vs when it's written by the CPU?

fincs avatar May 21 '22 11:05 fincs

I agree, it seems like an odd fix and I'm unsure why it works. But there shouldn't be any Z fighting because there is only one texture and one quad. I don't think there would be a data race either since it is not multi threaded, but maybe I'm doing something wrong. The repro case is attached to the bug report (#40)

jtothebell avatar May 21 '22 23:05 jtothebell