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

Support cubemaps in Qt Quick

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.3.0
    • Quick: Other
    • None

    Description

      Qt Quick ShaderEffect can automatically make image / item properties available in shaders as textures. Consider supporting also cubemaps with a new "CubeMap" element and type. As an example something like this:

       

      CubeMap {
        id: cubeMapItem
        sourceFront: "skybox1_front.png"
        sourceLeft: "skybox1_left.png"
        sourceRight: "skybox1_right.png"
        sourceTop: "skybox1_top.png"
        sourceBottom: "skybox1_bottom.png"
        sourceBack: "skybox1_back.png"
        // Maybe also "sourceSkyBox" for single image etc. API
      }
      
      ShaderEffect {
        property CubeMap skyCubeMap: cubeMapItem
        ...
      }
      // fragment shader
      vec3 dir = vec3(1.0, uv.y, uv.x);
      fragColor = texture(skyCubeMap, dir);
      

      An example of simple cubemap usage: https://www.shadertoy.com/view/XsjfDD

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            kagro Kaj Grönholm
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes