Napari: Antialiasing to reduce Moire effects

Created on 20 Apr 2019  路  4Comments  路  Source: napari/napari

馃殌 Feature

Antialiasing for 2D rendering

image

Motivation

Modern graphics card are very very powerfull, 2D rendering is peanuts for them.
OpenGL has lots of cool features such as MSAA that can be just turned on.
Vispy seems to support some antialiasing (not sure what kind).

Here is a discussion on this by the VISPY folks:

https://github.com/vispy/vispy/wiki/Tech.-Antialiasing

Some visuals in Vispy support it:

http://vispy.org/visuals.html

But in our case it seems that for example that the vectors layers for example is heavily aliased.

Proposal:

  • make sure that all visuals have antialias=True (particularly vectors layer)
  • Try to use MSAA by turning it on at the OpenGL level
bug

Most helpful comment

They should, antialias is not specific to old lines stuff...

All 4 comments

We are no longer using OpenGL lines in the vectors layer, but now using mesh visuals due to problems with arbitrary line widths. I am not sure if they support an antialias mode

They should, antialias is not specific to old lines stuff...

That's great. I didn't see it exposed at a highlevel in vispy for meshes like it is for some line visuals, but we can dig in

This behaviour was fixed by using the mesh visual in #215 and i can no longer reproduce any moire effects. If anyone encounters additional aliasing problems they can either reopen this issue or create a new one with steps to reproduce

Was this page helpful?
0 / 5 - 0 ratings

Related issues

royerloic picture royerloic  路  3Comments

adamltyson picture adamltyson  路  3Comments

GenevieveBuckley picture GenevieveBuckley  路  3Comments

neuromusic picture neuromusic  路  3Comments

sofroniewn picture sofroniewn  路  3Comments