[Development] Antialiasing

Wehmer, Matthias Matthias.Wehmer at draeger.com
Fri Oct 5 14:28:05 CEST 2012

Hi Samuel,

I will try to make myself clearer, sorry for that unclear information.
The shaders I'm talking about are those, that I implemented in my custom Qml plugin via the QSGSimpleMaterial class. There I have implemented two custom versions of the vertex and the fragment shader, whereby the later is just coloring the scene. OpenGL itself is involved in such a way as I use it to pass a texture to the fragment shader, but the geometry for example is created with the methods and objects given by Qt, i.e. I use a QSGGeometryNode and attach my geometry to it and simply draw a Line_Strip between them.

The setAntialiasing() method I talk about is the one from the QQuickItem class.

>From my understanding this method should turn on some kind of postprocessing, that is antialise the scene after it is drawn by the SceneGraph. Obviously this doesn't work for my custom widget, although all other items are antialiased. So either I understand this option and its consequences wrong or I need to implement some postprocessing on my own. For that I would need access to the scene (in form of a texture) after it has been drawn by the SceneGraph. Is there a possibility for that? Do you see my problem and what I understand wrong? I'm kinda struggling right now, because the whole rendering mechanism seems to be a black box for me. :D

Thank you very much for your help so far.


Previous message:

Message: 5
Date: Fri, 5 Oct 2012 13:53:03 +0200
From: Samuel R?dal <samuel.rodal at digia.com>
Subject: Re: [Development] Antiaaliasing
To: <development at qt-project.org>
Message-ID: <506ECA1F.2050403 at digia.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed

On 10/05/2012 11:57 AM, Wehmer, Matthias wrote:
> Hi everybody,
> I need some information regarding the antialiasing functionality in Qt
> 5. I have implemented a custom widget which basically draws a lot of
> lines (also uses custom materials). Unfortunately they are not at all
> AA. Anyway, via setAntialiasing() I turned AA on, but nothing happens.
> How exactly does Qt5 perform the AA, what do I have take care of when
> combinintg my own shaders with the AA from Qt5? Is there a possibility
> to add manually some postprocessing?

This is a bit too little information to go on. What shaders are you talking about? You're also talking about a custom widget, which makes me unsure about whether you're using OpenGL or the raster paint engine.

Also, which setAntialiasing() is that?

This communication contains confidential information. If you are not the intended recipient please return this email to the sender and delete it from your records.

Diese Nachricht enthaelt vertrauliche Informationen. Sollten Sie nicht der beabsichtigte Empfaenger dieser E-mail sein, senden Sie bitte diese an den Absender zurueck und loeschen Sie die E-mail aus Ihrem System.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20121005/497ac7a0/attachment.html>

More information about the Development mailing list