17 if (!device || !light) {
25 auto shadowMap = std::make_unique<ShadowMap>();
32 depthOptions.
name = isOmni ?
"OmniShadowCube" :
"ShadowMap";
33 depthOptions.
width =
static_cast<uint32_t
>(resolution);
34 depthOptions.
height =
static_cast<uint32_t
>(resolution);
35 depthOptions.
format = info.format;
40 shadowMap->_shadowTexture = std::make_shared<Texture>(device, depthOptions);
49 for (
int face = 0; face < faceCount; ++face) {
52 rtOptions.
name =
"ShadowMapRT-face" + std::to_string(face);
53 rtOptions.
face = face;
57 rtOptions.
depthBuffer = shadowMap->_shadowTexture.get();
58 rtOptions.
depth =
true;
61 rtOptions.
colorBuffer = shadowMap->_shadowTexture.get();
62 rtOptions.
depth =
true;