Page 1 of 1

Problem with Anti-Aliasing in XAML views

Posted: 20 Jan 2025, 17:43
by MarioBarbero
Hello

I have problem with Anti-Aliasing in some paths o shapes. I have seen many posts about this topic and the PPAA option set true in Noesis view options.
I already set to true and it still see bad.
The problem is in the both lines, yellow and white.
How can I solve this problem?

I attach a two pictures about the settings of Noesis view and another one about lines.

Re: Problem with Anti-Aliasing in XAML views

Posted: 20 Jan 2025, 17:48
by jsantos
Could you please attach an image with the problem instead of a video? And better if you can also attach a minimal XAML reproducing the issue. Thanks!

Re: Problem with Anti-Aliasing in XAML views

Posted: 20 Jan 2025, 17:52
by MarioBarbero
I just upload an image

Re: Problem with Anti-Aliasing in XAML views

Posted: 20 Jan 2025, 18:03
by jsantos
Could you attach the image directly? I see a file called "Line_WPF.png" (is that Noesis or WPF) and the image quality is super bad (a lot of compression artifacts).

Re: Problem with Anti-Aliasing in XAML views

Posted: 21 Jan 2025, 10:28
by MarioBarbero
Ok, I attach file of image directly.
The lines are inside Canvas and they are made by code behind with geometry and path.

Re: Problem with Anti-Aliasing in XAML views

Posted: 21 Jan 2025, 23:55
by jsantos
PPAA is a cheap antialiasing algorithm. Its quality can be fine-tuned per element, as outlined in the linked tutorial.
<Rectangle noesis:Element.PPAAIn="1" noesis:Element.PPAAOut="1" Fill="Black" Width="100" Height="100">
  <Rectangle.RenderTransform>
    <TransformGroup>
      <RotateTransform Angle="60"/>
      <TranslateTransform X="200" Y="10"/>
    </TransformGroup>
  </Rectangle.RenderTransform>
</Rectangle>
If PPAA does not meet your quality requirements, you can disable it entirely and opt for alternatives like GPU MSAA.

Please, let me know which option works best for your needs!

Re: Problem with Anti-Aliasing in XAML views

Posted: 22 Jan 2025, 20:48
by MarioBarbero
Thank you for your solution.
It works and the lines improves but it is not enough.
How can I set MSAA by code, code behind or in xaml file?
Or if exist another solution.

The attached image is with PPAA no setted and setted

Re: Problem with Anti-Aliasing in XAML views

Posted: 23 Jan 2025, 00:24
by jsantos
What PPAAIn and PPAAOut parameters did you try?

MSAA must be enabled in Unity, in the settings of the projects or in the camera. But this is not a trivial change and can affect the whole project, make sure to consult this with your rendering engineers before proceeding.

Re: Problem with Anti-Aliasing in XAML views

Posted: 23 Jan 2025, 03:43
by KeldorKatarn
Thank you for your solution.
It works and the lines improves but it is not enough.
How can I set MSAA by code, code behind or in xaml file?
Or if exist another solution.

The attached image is with PPAA no setted and setted
Try a blur effect with a small radius. That can improve things further

Re: Problem with Anti-Aliasing in XAML views

Posted: 27 Jan 2025, 19:31
by jsantos
Please, let us know if you need a quick meeting for discussing more about this.