Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-116863

Qt3D RHI rendere doesn't support ClearBuffers correctly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.2, 6.6, 6.7
    • Qt3D
    • None
    • Windows

    Description

      If there's multiple ClearBuffers in a FrameGraph, only last one will be used. The state is also no executed correctly. 

      For example:

       

      import Qt3D.Core 2.0
      import Qt3D.Render 2.0
      RenderSettings {
          id: quadViewportFrameGraph
          property alias topLeftCamera: cameraSelectorTopLeftViewport.camera;
          property alias topRightCamera: cameraSelectorTopRightViewport.camera;
          property alias bottomLeftCamera: cameraSelectorBottomLeftViewport.camera;
          property alias bottomRightCamera: cameraSelectorBottomRightViewport.camera;
          property alias window: surfaceSelector.surface
          activeFrameGraph: RenderSurfaceSelector {
              id: surfaceSelector
              //! [0]
              Viewport {
                  id: mainViewport
                  normalizedRect: Qt.rect(0, 0, 1, 1)
                  ClearBuffers {
                      buffers: ClearBuffers.ColorDepthBuffer
                      clearColor: Qt.rgba(0.6, 0.6, 0.6, 1.0)
                      NoDraw {}
                  }
                  Viewport {
                      id: topLeftViewport
                      normalizedRect: Qt.rect(0, 0, 0.5, 0.5)
                      CameraSelector { id: cameraSelectorTopLeftViewport }
                  }
                  Viewport {
                      id: topRightViewport
                      normalizedRect: Qt.rect(0.5, 0, 0.5, 0.5)
                      CameraSelector { id: cameraSelectorTopRightViewport }
                  }
                  Viewport {
                      id: bottomLeftViewport
                      normalizedRect: Qt.rect(0, 0.5, 0.5, 0.5)
                      CameraSelector { id: cameraSelectorBottomLeftViewport }
                  }
                  Viewport {
                      id: bottomRightViewport
                      normalizedRect: Qt.rect(0.25, 0.25, 0.75, 0.75)
                      ClearBuffers {
                          buffers: ClearBuffers.ColorDepthBuffer
                          clearColor: Qt.rgba(1, 0., 0., 1.0)
                          CameraSelector { id: cameraSelectorBottomRightViewport }
                      }
                  }
              }
              //! [0]
          }
      }
      

       

       With RHI (opengl or directx) will result in incorrect rendering:

      With environment variable QT3D_RENDERER  = opengl, gives the correct result:

      I've attached sample code to reproduce this bug. 

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            seanharmer Sean Harmer
            vpicaver Philip Schuchardt
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes