Poor quality of anti-aliasing on NVidia GPU

Skip to first unread message

Vinícius Felipe

May 29, 2024, 10:08:00 AMMay 29
to skia-discuss
Some users are complaining about the antialiasing quality of circle for example when comparing Skia on Windows using Intel integrated graphics cards vs NVidia gpus.

Is this an expected limitation or a known issue? Is there a workaround?
(We are using Skia m107)

Michael Ludwig

May 30, 2024, 12:41:13 PMMay 30
to skia-discuss
On Intel machines we fairly unilaterally disable MSAA-based rendering techniques, so the intel OpenGL and Vulkan cases are quite likely rendering on the CPU and just uploading a texture. There is a chance, since this is a convex shape, that it's using an analytic convex path renderer.  When MSAA is available, we prioritize some faster tessellating path renderers. It looks like on nVidia the sample locations are different between OpenGL and Vulkan for whatever reason, but both show a similar variety of grayscale values. I would guess that this is MSAA4 and is using the atlas'ing path renderer, which uses a sample count from GrContextOptions::fInternalMultisampleCount.  This defaults to 4, but you can override it to 8 and get higher visual quality.  You can also set it to 0 to disable the offscreen MSAA-based techniques. 

DirectX 11 is drawing a circle without any anti-aliasing. You can do the same in Ganesh by setting the SkPaint's antialias boolean to false, although this will be ignored if you've created a MSAA surface to render directly too.

Reply all
Reply to author
0 new messages