Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-10206

Lights baking fails if there is a shader asset in the project

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3: Somewhat important P3: Somewhat important
    • QDS 4.3
    • QDS 4.2
    • 3D View
    • None
    • 2
    • ffb1bb11d (qds/dev)

      Create new 3D project, set the light to cast shadows, choose bake lights from 3D view context menu, set valid baking properties and click bake button -> Light baking is done normally.

      Add any shader asset into the project via assets view (e.g. foobar.frag). Choose bake lights from 3D view context menu again and click bake button -> Baking log only says "Baking aborted: Invalid View3D object set."

      Puppet debug trace will show:

      [21124] QShaderBaker: Failed to open C:/dev/qt/DesignStudio/apps/UntitledProject32/content/shaders/foobar.frag.qsb

      Note that this happens even if the shader asset is not in use in the project, it just has to exist in in content/shaders folder under the project. Having the shader in any other folder is fine for some reason.

      This warning presumably comes from qtshadertools\src\shadertools\qshaderbaker.cpp
      QShaderBakerPrivate::readFile() function. 

      This is somehow related to automatic ShaderTool section in .qmlproject file, if that is commented out, baking works fine. It is unclear why this section should affect light baking at all.

        For Gerrit Dashboard: QDS-10206
        # Subject Branch Project Status CR V

            e0348803 Miikka Heikkinen
            e0348803 Miikka Heikkinen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes