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
- is required for
-
QTBUG-82245 Quick3D custom materials with RHI (excl. blits/multipass)
- Closed