vfbb 285 Posted May 10 @Hans♫ Is this an image or a path? (we have to understand if the arrow is being drawn or resized) Can you share the source of this icon? Share this post Link to post
Hans♫ 75 Posted May 10 Its a path. Our code looks like this (simplified): fStroke := TStrokeBrush.Create(TBrushKind.Solid, claSilver); fStroke.Thickness := 1.5; fPath := TPathData.Create; fPath.AddEllipse(RectF(-12, -12, 12, 12)); ... Canvas.DrawPath(fPath, 1, fStroke); Share this post Link to post
vfbb 285 Posted May 12 @Hans♫ Do you have a blank project simulating this? I drew directly in the form's OnPaint using your example on a blank project and got the same result for all renders, except for the FMX GPU without Skia which seems to be bugged. scale 1x: scale 2.25x: Share this post Link to post
Hans♫ 75 Posted May 14 On 5/12/2024 at 9:06 PM, vfbb said: Do you have a blank project simulating this? Yes, I can reproduce this in a blank project. You did not see it because you used gray in gray. When using white on black, then you can see it: <No Skia | Skia + Vulkan > Enlarged: <No Skia | Skia + Vulkan > This is produced with an empty app with only this code: GlobalUseSkia := true; GlobalUseSkiaRasterWhenAvailable := false; GlobalUseVulkan := true; ... procedure TForm1.PaintBox1Paint(Sender: TObject; Canvas: TCanvas); var lStroke: TStrokeBrush; lPath: TPathData; begin lStroke := TStrokeBrush.Create(TBrushKind.Solid, claWhite); lStroke.Thickness := 1.5; lPath := TPathData.Create; lPath.AddEllipse(RectF(-12, -12, 12, 12)); lPath.Translate(50,50); Canvas.Fill.Color := claBlack; Canvas.FillRect(RectF(0,0,100,100), 0, 0, [], 1); Canvas.DrawPath(lPath, 1, lStroke); lStroke.Free; lPath.Free; end; Share this post Link to post
Anders Melander 1783 Posted May 14 4 hours ago, Hans♫ said: Wow... 2 bit color depth. This looks like a really bad attempt at supersampling. Or someone got the order of gamma correction mixed up so instead of sRGB->Linear->sRGB they are doing Linear->sRGB->Linear. But that wouldn't explain the 2 bits. Share this post Link to post
vfbb 285 Posted May 14 @Hans♫ I used the same code you provided and got satisfactory results. Look: <No Skia> | <Skia + Vulkan> (Scale 100%) It is difficult to deduce what is happening if the same code is producing different results. That's why I think it would be interesting if we could test it on more machines. The project I used is attached: testVulkan.7z 1 Share this post Link to post
DelphiUdIT 176 Posted May 14 (edited) This is mine, same project of @vfbb but with 2 graphics surface from the same PC (always with vulkan enable): Intel Nvidia Intel: Intel(R) Iris(R) Xe Graphics Nvidia: NVIDIA GeForce RTX 3070 Ti Laptop GPU P.S.: Vulkan version 1.3.277 Edited May 14 by DelphiUdIT 1 Share this post Link to post
Rafal.B 3 Posted May 14 (edited) NVIDIA RTX 3000 graphics card In both cases, GlobalUseSkiaRasterWhenAvailable=False and GlobalUseVulkan=True. In my opinion, it looks better when GlobalUseSkia = False; Edited May 15 by Rafal.B 1 Share this post Link to post
Lars Fosdal 1792 Posted May 15 S = GlobalUseSkia V = GlobalUseVulcan GlobalUseSkiaRasterWhenAvailable = False HW: Lenovo P16 Name NVIDIA RTX A4500 Laptop GPU PNP Device ID PCI\VEN_10DE&DEV_24BA&SUBSYS_22DB17AA&REV_A1\4&35D2CA85&0&0008 Adapter Type NVIDIA RTX A4500 Laptop GPU, NVIDIA compatible Adapter Description NVIDIA RTX A4500 Laptop GPU Name Intel(R) UHD Graphics PNP Device ID PCI\VEN_8086&DEV_4688&SUBSYS_22FB17AA&REV_0C\3&11583659&0&10 Adapter Type Intel(R) UHD Graphics Family, Intel Corporation compatible Adapter Description Intel(R) UHD Graphics 1 Share this post Link to post
Hans♫ 75 Posted May 29 @vfbb Any update on this issue? - Maybe a bug should be filed in the QP? Share this post Link to post
vfbb 285 Posted May 29 @Hans♫ I think that could be a Google Skia limitation or issue, so the right place to report bugs is on https://issues.skia.org/, instead on QP. However, I have already opened a new conversation in the Skia group to obtain more information about this: Poor quality of anti-aliasing on NVidia GPU (google.com) 1 Share this post Link to post
hsauro 40 Posted June 8 There is a reply to the query from skis-discuss. Not sure if it helps: 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 Share this post Link to post