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

Strange behvaiour with ObjectPicker using multiple viewports / layer filters

    XMLWordPrintable

    Details

      Description

      I have created two scene entities with independent cameras, which uses a LayerFilter to separate the scenes in a custom ForwardRenderer. The foreground layer scene is rendered on top corner in front of the background scene.

      RenderSettings {
                  id : external_forward_renderer
                  activeFrameGraph :
      
                      RenderSurfaceSelector {
                          Viewport {
                              normalizedRect: Qt.rect(0,0,1,1)
      
                              ClearBuffers {
                                  buffers: ClearBuffers.ColorDepthStencilBuffer
                                  clearColor: Qt.rgba(1.0,1.0,1.0,0.0)
      
                                  LayerFilter {
                                      layers: [
                                          sceneLayer
                                      ]
      
                                      CameraSelector {
                                          camera: backgroundCamera
                                      }
                                  }
                              }
                          }
      
                          Viewport {
                              normalizedRect: Qt.rect(0.85,0.03,0.15,.15)
      
                              ClearBuffers {
                                  buffers: ClearBuffers.DepthStencilBuffer
      
                                  LayerFilter {
                                      layers: [
                                          foregroundLayer,
                                      ]
                                      filterMode: LayerFilter.AcceptAllMatchingLayers
      
                                      CameraSelector {
                                          camera: foregroundCamera
                                      }
                                  }
                              }
                          }
                      }
                  pickingSettings {
                          pickMethod: PickingSettings.TrianglePicking
                  }
              }
      

      I have set both 'layers' to have object selection, however, as soon as the background scene contains an entity with an ObjectPicker entity, the foreground object picking does not behave correctly and results in strange inconsistent behaviour, which favours picking the entities in the background scene.

      I am not sure if this a use case outside what object selection supports. Perhaps the object selection does not map correctly to the layer filter?

       

      Please advise if you need more information.

        Attachments

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

          Activity

            People

            Assignee:
            seanharmer Sean Harmer
            Reporter:
            luke_parry Luke Parry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes