friction2d / friction

Friction Graphics
https://friction.graphics
GNU General Public License v3.0
300 stars 15 forks source link

GPU (Radeon/NVIDIA) AA issues #304

Open rodlie opened 2 weeks ago

rodlie commented 2 weeks ago

So, this has been reported to me several times and is a known issue (see any release notes). But I never made an issue to track the progress/status.

What's the problem?

Paths are not antialiased on some GPUs, creating bad preview/renders.

How to replicate?

Add some text and zoom in, either is smooth/perfect or not ("k" is a good char to test with)

GPUs affected?

GPUs that work?

How to fix?

I don't know.

rodlie commented 2 weeks ago

Just as a reference, Intel GPU:

Screenshot from 2024-11-06 13-11-54

On NVIDIA (and possible Radeon) you will notice jagged lines on the k.

rodlie commented 1 week ago

NVIDIA status

So, wasted yesterday testing NVIDIA cards, tested all kind of cards (20+ different cards). From laptops, desktops, Quadro, Geforce, Windows 10, Windows 11, various distros and a ton of different drivers.

Conclusion

So, what does this mean? something changed/broke in Pascal.

kroll-j commented 4 days ago

image This is on Linux with open source AMD drivers. There is antialiasing, but it looks a bit coarser to me, compared to the Intel screenshot. Maybe this driver uses a different AA method.

rodlie commented 4 days ago

This is identical to NVIDIA Pascal or newer.

kroll-j commented 4 days ago

image Again, AMD. Zoomed in. This looks to me like it could be oversampling (maybe 4x?) rather than proper antialiasing.

Reminds me of glHint(GL_LINE_SMOOTH, GL_NICEST) vs glHint(GL_LINE_SMOOTH, GL_FASTEST) in OpenGL immediate mode where the driver would be free to pick an implementation and results would vary depending on the driver and card. But that was ages ago. Not sure how the render path works in friction/skia.

rodlie commented 4 days ago

On NVIDIA I tested all sorts of OpenGL versions, tweaks, settings, oversampling etc etc, nothing changed. Only a downgrade of the actual GPU did something.

So, that's all I know and nothing I can do about it (as far as I know, I hope to be corrected at some point).