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

ShaderData transformations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • None
    • 5.7.0
    • Qt3D
    • None
    • 0c7e6a3904624e80e53c15c3ecffac8eb96cdfab

    Description

      The mutex I've just added to:

      bool ShaderData::updateWorldTransform(const QMatrix4x4 &worldMatrix)

      prevents a data race when calling this function but not sure it's correct if using multiple cameras as the last renderview builder job to call this function will populate this data.

      The m_viewMatrix is specific to a given camera - which may change between renderviews - so we need to store the transformed data for each view matrix. As such, I think having the ShaderData store only the source data, and not the transformed data is the way to go. Whether we store the transformed data in each renderview or in some other data structure that allows the renderviews to lookup the data for their view transform is up for debate.

      1) Storing the transformed data in the renderviews means we potentially repeat work if multiple renderviews use the same camera. The amount of work to repeat is usually small and this would be the simpler approach as we can do it form within the renderview builder job.

      2) Storing the transformed data in some other intermediate data structure means we avoid repeating work but requires a new job and data structure that the renderviews can lookup from when being built.

      So perhaps, going for 1) in the short term followed by 2) later if we find the repeated workload to be an issue is the right approach.

      Attachments

        For Gerrit Dashboard: QTBUG-54818
        # Subject Branch Project Status CR V

        Activity

          People

            lemire_p Paul Lemire
            seanharmer Sean Harmer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes