Fix crash on shadows when using D3D10
This commit is contained in:
@@ -348,7 +348,7 @@ public:
|
||||
|
||||
void InitStaticAtlas()
|
||||
{
|
||||
const int32 atlasResolution = Resolution * 2;
|
||||
const int32 atlasResolution = Math::Min(Resolution * 2, GPUDevice::Instance->Limits.MaximumTexture2DSize);
|
||||
if (StaticAtlas.Width == atlasResolution)
|
||||
return;
|
||||
StaticAtlas.Init(atlasResolution, atlasResolution);
|
||||
@@ -1120,6 +1120,7 @@ void ShadowsPass::SetupShadows(RenderContext& renderContext, RenderContextBatch&
|
||||
default:
|
||||
return;
|
||||
}
|
||||
atlasResolution = Math::Min(atlasResolution, GPUDevice::Instance->Limits.MaximumTexture2DSize);
|
||||
if (shadows.Resolution != atlasResolution)
|
||||
{
|
||||
shadows.Reset();
|
||||
|
||||
Reference in New Issue
Block a user