MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / CreateShadowMaps

Method CreateShadowMaps

BakingLab/MeshRenderer.cpp:285–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285void MeshRenderer::CreateShadowMaps()
286{
287 // Create the shadow map as a texture atlas
288 sunShadowDepthMap.Initialize(device, ShadowMapSize, ShadowMapSize, DXGI_FORMAT_D24_UNORM_S8_UINT, true,
289 ShadowMSAASamples, 0, 1);
290
291 DXGI_FORMAT smFmt = DXGI_FORMAT_R32G32B32A32_FLOAT;
292 uint32 numMips = EnableShadowMips ? 0 : 1;
293 sunVSM.Initialize(device, ShadowMapSize, ShadowMapSize, smFmt, numMips, 1, 0,
294 EnableShadowMips, false, NumCascades, false);
295
296 tempVSM.Initialize(device, ShadowMapSize, ShadowMapSize, smFmt, 1, 1, 0, false, false, 1, false);
297
298 areaLightShadowMap.Initialize(device, ShadowMapSize, ShadowMapSize, DXGI_FORMAT_D32_FLOAT, true, 1, 0, 6, true);
299}
300
301// Loads resources
302void MeshRenderer::Initialize(ID3D11Device* device, ID3D11DeviceContext* context, const Model* model)

Callers

nothing calls this directly

Calls 1

InitializeMethod · 0.45

Tested by

no test coverage detected