80 Q_DISABLE_COPY(QSSGRenderShadowMap)
83 const QSSGRenderContextInterface &m_context;
86 ~QSSGRenderShadowMap();
87 void releaseCachedResources();
88 void addShadowMaps(
const QSSGShaderLightList &renderableLights);
101 QSSGShadowMapEntry *addShadowMap(quint32 lightIdx,
103 QVector<QSSGShadowMapEntry::AtlasEntry> atlasEntries,
104 quint32 csmNumSplits,
105 QRhiTexture::Format format,
107 const QString &renderNodeObjName);
109 QVector<QSSGShadowMapEntry> m_shadowMapList;
110 std::unique_ptr<QRhiTexture> m_shadowMapAtlasTexture;
111 std::unique_ptr<QRhiTexture> m_shadowMapBlueNoiseTexture;
112 std::unique_ptr<QRhiSampler> m_sharedCubeToAtlasSampler;
113 std::unique_ptr<QRhiBuffer> m_sharedFrontCubeToAtlasUniformBuffer;
114 std::unique_ptr<QRhiBuffer> m_sharedBackCubeToAtlasUniformBuffer;
115 std::unique_ptr<QRhiShaderResourceBindings> m_shadowClearSrb;
116 QVector<QRhiRenderBuffer *> m_layerDepthStencilBuffers;
117 QVector<QRhiTextureRenderTarget *> m_layerRenderTargets;
118 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