mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-09 21:44:54 +00:00
Fix composite map when force shaders is enabled
This commit is contained in:
parent
d055dc25bf
commit
9eed7fa6f5
@ -105,8 +105,9 @@ std::vector<osg::ref_ptr<osg::StateSet> > ChunkManager::createPasses(float chunk
|
|||||||
mStorage->getBlendmaps(chunkSize, chunkCenter, false, blendmaps, layerList);
|
mStorage->getBlendmaps(chunkSize, chunkCenter, false, blendmaps, layerList);
|
||||||
|
|
||||||
bool useShaders = mSceneManager->getForceShaders();
|
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
|
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<TextureLayer> layers;
|
std::vector<TextureLayer> layers;
|
||||||
{
|
{
|
||||||
for (std::vector<LayerInfo>::const_iterator it = layerList.begin(); it != layerList.end(); ++it)
|
for (std::vector<LayerInfo>::const_iterator it = layerList.begin(); it != layerList.end(); ++it)
|
||||||
@ -127,6 +128,9 @@ std::vector<osg::ref_ptr<osg::StateSet> > ChunkManager::createPasses(float chunk
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (forCompositeMap)
|
||||||
|
useShaders = false;
|
||||||
|
|
||||||
std::vector<osg::ref_ptr<osg::Texture2D> > blendmapTextures;
|
std::vector<osg::ref_ptr<osg::Texture2D> > blendmapTextures;
|
||||||
for (std::vector<osg::ref_ptr<osg::Image> >::const_iterator it = blendmaps.begin(); it != blendmaps.end(); ++it)
|
for (std::vector<osg::ref_ptr<osg::Image> >::const_iterator it = blendmaps.begin(); it != blendmaps.end(); ++it)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user