TurboWarp / desktop

A better offline editor for Scratch 3.
https://desktop.turbowarp.org/
GNU General Public License v3.0
369 stars 85 forks source link

Ghosting/smearing visual effect when MFAA is enabled on NVIDIA GPUs #568

Open headquarter8302 opened 1 year ago

headquarter8302 commented 1 year ago

Occurs in TurboWarp Desktop v1.6.1, Electron 21.0.1, win32 x64, MS Store release. GPU: NVIDIA GeForce MX230, Driver version: 31.0.15.2756, Driver date: 2022-12-05, DirectX version: 12 (FL 12.1).

By enabling Multi-Frame Sampled AA in the NVIDIA Control Panel, there can be seen ghosting or smearing artifacts across the GUI consistently, this does not occur within the stage canvas.

Software driver/GPU problems can be crossed out since I have the leading edge stable drivers installed, and the issue only appears in Turbowarp, not anywhere else. image image image image image

I have seen that Antialiasing in general may cause issues like these, but it is overtly exaggerated in Turbowarp compared to other desktop applications, the original Scratch Desktop application doesn't have this issue

GarboMuffin commented 1 year ago

This is probably a side effect of how Chromium doesn't re-render interface elements that haven't changed combined with our optimizations where we don't re-render the stage if no sprites moved, so NVIDIA's driver tricks that assume a constant stream of frames don't work properly.

You can report this to NVIDIA or turn off MFAA for TurboWarp. I don't think there's much we can do without burning batteries.

headquarter8302 commented 1 year ago

I see, if that's so, can a forced redraw of the window (aside from the stage canvas) remedy the issue?

I also don't know if MFAA is beneficial in the context of the editor, the thing turned on by itself.

GarboMuffin commented 1 year ago

Do the artifacts go away if you start a project with constant motion or resize the window?

headquarter8302 commented 1 year ago

Yes, the artifacts do go away if there is a reflow or change in window size. And as you stated, trying to repaint the whole thing everytime causes performance and visual degradation.

I wonder if there is a browser flag that can mitigate this... in the mean time, filed a report to NVIDIA