Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Qt3D] Anti-aliasing



  • Scene3D QML has multisample property. If it is used all 3d scene gets anti-aliased, but it slows down my app including GUI on not so powerful android tablets

    In fact I don't need anti-aliasing for whole scene so I wonder how one can apply anti-aliasing for just a few layers where I need it?

    Something like this (but it doesn't work):

    m_layerFilterExtra = new QLayerFilter();
    m_layerFilterExtra->addLayer(layerSun);
    m_layerFilterExtra->addLayer(layerObject);
    renderStateSet = new QRenderStateSet();
    renderStateSet->addRenderState(new QNoDepthMask());
    renderStateSet->addRenderState(new QMultiSampleAntiAliasing());
    renderStateSet->setParent(m_layerFilterExtra);
    m_layerFilterExtra->setParent(cameraSelector);
    

    And another question how FXAA can be used instead of multisampling. FXAA is mentioned in qt3dstudio https://doc.qt.io/qt3dstudio/fxaa-effect.html

    Thanks in advanced for help!


    With regards, Oleg.


Log in to reply