Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.5.2, 6.6, 6.7
-
None
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.