Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QT3D anti-aliasing problem
Qt 6.11 is out! See what's new in the release blog

QT3D anti-aliasing problem

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 1.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    shangariLa
    wrote on last edited by shangariLa
    #1

    I am doing a C++ app which captures the scene rendered with QT3D. What I noticed is , there is no anti-aliasing applied as there are jagged edges as well as temporal flickering. A quick test with QT example (Qt 3D: Shadow Map QML Example) also shows same problem (look at shadow etc). I am using QT5.8 for windows.

    Google search show there is one related QMultiSampleAntiAliasing Class, which require multisampling enabled. However, there are problem reported to use multisampling with render capture ( bug report1 and bug2 ). I wonder if there is other anti-aliasing available ? Anyone knows how to apply, for example FXAA (or other AA) on QT3D rendered scene? Any C++ example will be very helpful. Thanks

    1 Reply Last reply
    0
    • m.sueM Offline
      m.sueM Offline
      m.sue
      wrote on last edited by
      #2

      Hi,

      IIRC you have to use code like the following before you create any Qt3DWindow.

      QSurfaceFormat format;
      format.setDepthBufferSize(24);
      format.setSamples(4);
      QSurfaceFormat::setDefaultFormat(format);
      

      -Michael.

      S 1 Reply Last reply
      1
      • m.sueM m.sue

        Hi,

        IIRC you have to use code like the following before you create any Qt3DWindow.

        QSurfaceFormat format;
        format.setDepthBufferSize(24);
        format.setSamples(4);
        QSurfaceFormat::setDefaultFormat(format);
        

        -Michael.

        S Offline
        S Offline
        shangariLa
        wrote on last edited by
        #3

        @m.sue , I just tried it with my own code and on QT examples, the problems stay the same as before. By setting the default surface format to what you posted, does it support anti-aliasing by default? is there anything else I need to do in addition to the code you posted? Thank you .

        1 Reply Last reply
        0
        • R Offline
          R Offline
          RSteffen
          wrote on last edited by
          #4

          Hi,
          I have the same Problem. Where I have to add the QMultiSampleAntiAliasing instance?

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved