From 9eed7fa6f5a7129c7c5e06fd29efd0f7e675ff2f Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 9 Mar 2017 21:23:06 +0100 Subject: [PATCH] Fix composite map when force shaders is enabled --- components/terrain/chunkmanager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/components/terrain/chunkmanager.cpp b/components/terrain/chunkmanager.cpp index ddba8699f..3eb48d88f 100644 --- a/components/terrain/chunkmanager.cpp +++ b/components/terrain/chunkmanager.cpp @@ -105,8 +105,9 @@ std::vector > ChunkManager::createPasses(float chunk mStorage->getBlendmaps(chunkSize, chunkCenter, false, blendmaps, layerList); bool useShaders = mSceneManager->getForceShaders(); - if (!mSceneManager->getClampLighting() && !forCompositeMap) + if (!mSceneManager->getClampLighting()) useShaders = true; // always use shaders when lighting is unclamped, this is to avoid lighting seams between a terrain chunk with normal maps and one without normal maps + std::vector layers; { for (std::vector::const_iterator it = layerList.begin(); it != layerList.end(); ++it) @@ -127,6 +128,9 @@ std::vector > ChunkManager::createPasses(float chunk } } + if (forCompositeMap) + useShaders = false; + std::vector > blendmapTextures; for (std::vector >::const_iterator it = blendmaps.begin(); it != blendmaps.end(); ++it) {