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

rhi: Support for arrays of textures

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • 5.15
    • None
    • Qt RHI, Quick: 3D
    • None

    Description

      Qt Quick 3D custom materials rely on arrays of textures (note: not texture arrays (i.e. sampler2DArray and such)):

      layout(binding = 10) uniform sampler2D lightProbe;
      layout(binding = 11) uniform sampler2D lightProbe2;
      layout(binding = 8) uniform sampler2D shadowMaps[8];
      layout(binding = 9) uniform samplerCube shadowCubes[8];
      layout(binding = 4) uniform sampler2D uEnvironmentTexture;
      layout(binding = 6) uniform sampler2D depthTexture;
      layout(binding = 7) uniform sampler2D aoTexture;
      layout(binding = 5) uniform sampler2D uBakedShadowTexture;
      layout(std140, binding = 0) uniform cbMain {
         ...
      }
      

      layout(binding = 8) uniform sampler2D shadowMaps[8];
      and
      layout(binding = 9) uniform samplerCube shadowCubes[8];

      are not something we support currently.

      In uniform blocks, there is support for arrays of struct, float, vec2, vec3 and vec4, but for combined image samplers the dimension is effectively ignored and only [0] will be set. There is also no way to provide a list of (texture, sampler) pairs in the QRhiShaderResourceBindings API.

      Note: with Metal it turns out that MSL 1.2 is not sufficient: "Shader baking failed: MSL 2.0 or greater is required for arrays of textures."

      Attachments

        Issue Links

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

          Activity

            People

              lagocs Laszlo Agocs
              lagocs Laszlo Agocs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: