78 Q_DISABLE_COPY(QSSGRenderShadowMap)
81 const QSSGRenderContextInterface &m_context;
84 ~QSSGRenderShadowMap();
85 void releaseCachedResources();
86 void addShadowMaps(
const QSSGShaderLightList &renderableLights);
98 QSSGShadowMapEntry *addShadowMap(quint32 lightIdx,
100 QVector<QSSGShadowMapEntry::AtlasEntry> atlasEntries,
101 quint32 csmNumSplits,
102 QRhiTexture::Format format,
104 const QString &renderNodeObjName);
106 QVector<QSSGShadowMapEntry> m_shadowMapList;
107 std::unique_ptr<QRhiTexture> m_shadowMapAtlasTexture;
108 std::unique_ptr<QRhiSampler> m_sharedCubeToAtlasSampler;
109 std::unique_ptr<QRhiBuffer> m_sharedFrontCubeToAtlasUniformBuffer;
110 std::unique_ptr<QRhiBuffer> m_sharedBackCubeToAtlasUniformBuffer;
111 std::unique_ptr<QRhiShaderResourceBindings> m_shadowClearSrb;
112 QVector<QRhiRenderBuffer *> m_layerDepthStencilBuffers;
113 QVector<QRhiTextureRenderTarget *> m_layerRenderTargets;
114 QVector<QRhiRenderPassDescriptor *> m_layerRenderPassDescriptors;
std::array< QRhiRenderPassDescriptor *, 4 > m_rhiRenderPassDesc
std::array< QRhiTextureRenderTarget *, 6 > m_rhiRenderTargetCube
quint32 m_depthArrayIndex
shadow map texture array index
QRhiRenderBuffer * m_rhiDepthStencilCube
QMatrix4x4 m_fixedScaleBiasMatrix[4]
QMatrix4x4 m_lightViewProjection[4]
light view projection matrix
QRhiShaderResourceBindings * m_cubeToAtlasFrontSrb
void destroyRhiResources()
std::array< QRhiTextureRenderTarget *, 4 > m_rhiRenderTargets
QRhiShaderResourceBindings * m_cubeToAtlasBackSrb
QMatrix4x4 m_lightCubeView[6]
light cubemap view matrices
static QSSGShadowMapEntry withAtlas(quint32 lightIdx)
QRhiRenderPassDescriptor * m_rhiRenderPassDescCube
QRhiTexture * m_rhiDepthCube
QVector4D m_dimensionsInverted[4]
(x, y, z, 0) 4 vec4
quint32 m_lightIndex
the light index it belongs to