From 748dcf1e15e1a33100f90a615e546765307fdf58 Mon Sep 17 00:00:00 2001 From: hiker Date: Mon, 10 Feb 2014 21:35:13 +1100 Subject: [PATCH] Fixed running on hd3000 (8192 was too big for my system, not sure what values should be used best, I used the previous code here). --- src/graphics/rtts.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/graphics/rtts.cpp b/src/graphics/rtts.cpp index 288dc63b6..a5bab022b 100644 --- a/src/graphics/rtts.cpp +++ b/src/graphics/rtts.cpp @@ -37,7 +37,7 @@ RTT::RTT() const dimension2du ssaosize = UserConfigParams::m_ssao == 2 ? res : quarter; const u16 shadowside = 8192; - const dimension2du shadowsize(shadowside, shadowside); + dimension2du shadowsize(shadowside, shadowside); const dimension2du warpvsize(1, 512); const dimension2du warphsize(512, 1); @@ -88,6 +88,12 @@ RTT::RTT() rtts[RTT_SSAO] = drv->addRenderTargetTexture(ssaosize, "rtt.ssao", ECF_R8, stencil); rtts[RTT_SHADOW] = drv->addRenderTargetTexture(shadowsize, "rtt.shadow", ECF_A8R8G8B8, stencil); + if(!rtts[RTT_SHADOW]) + { + int n = UserConfigParams::m_shadows == 2 ? 2048 : 512; + shadowsize.set(n, n); + rtts[RTT_SHADOW] = drv->addRenderTargetTexture(shadowsize, "rtt.shadow", ECF_A8R8G8B8, stencil); + } rtts[RTT_WARPV] = drv->addRenderTargetTexture(warpvsize, "rtt.warpv", ECF_A8R8G8B8, stencil); rtts[RTT_WARPH] = drv->addRenderTargetTexture(warphsize, "rtt.warph", ECF_A8R8G8B8, stencil);