Skip to content

Conversation

@Bigfoot71
Copy link
Contributor

I finally managed to fix the triangle cracking and jittering issues!

The problem was actually pretty silly, the difference between the triangle edge and the first pixel of each line wasn't accounted for in the interpolation. Very, very silly...

While I was at it, I also made a bunch of other logical adjustments and renamed several variables to be more "standard" with what you usually see in papers.

I also fixed the same subpixel correction issue for quads and lines.

Additionally, I replaced the Bresenham line algorithm with a DDA. The new version has the advantage of being much more temporally stable during motion. It uses more floating-point calculations than Bresenham (which previously used some fixed point), but it's also much more vectorizable.

And for the most important and visible part, the triangles, here's a before/after comparison.

Note: The small flickering that remains in the second version is due to z-fighting with the lines under the mesh

Before

vid0.mp4

Now

vid1.mp4

@raysan5 raysan5 merged commit e501dfa into raysan5:master Oct 25, 2025
16 checks passed
@raysan5
Copy link
Owner

raysan5 commented Oct 25, 2025

@Bigfoot71 Oh! Nice improvement! I hardly noticed previous issue! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants