diff --git a/apps/openmw/mwrender/terrain.cpp b/apps/openmw/mwrender/terrain.cpp index e25b4b1893..d5f7684288 100644 --- a/apps/openmw/mwrender/terrain.cpp +++ b/apps/openmw/mwrender/terrain.cpp @@ -31,7 +31,7 @@ namespace MWRender TerrainMaterialGeneratorB::SM2Profile* matProfile = static_cast(activeProfile); - matProfile->setLightmapEnabled(false); // this doesn't disable the lightmap, although it should ?? + matProfile->setLightmapEnabled(false); matProfile->setReceiveDynamicShadowsEnabled(false); matProfile->setLayerNormalMappingEnabled(false); matProfile->setLayerParallaxMappingEnabled(false); diff --git a/apps/openmw/mwrender/terrainmaterial.cpp b/apps/openmw/mwrender/terrainmaterial.cpp index 2b1eb26041..541fcb91eb 100644 --- a/apps/openmw/mwrender/terrainmaterial.cpp +++ b/apps/openmw/mwrender/terrainmaterial.cpp @@ -196,7 +196,8 @@ namespace Ogre // count the texture units free uint8 freeTextureUnits = 16; // lightmap - --freeTextureUnits; + if (mLightmapEnabled) + --freeTextureUnits; // normalmap --freeTextureUnits; // colourmap @@ -1019,7 +1020,8 @@ namespace Ogre { outStream << // global normal - " float3 normal = expand(tex2D(globalNormal, uv)).rgb;\n"; + " float3 normal = expand(tex2D(globalNormal, uv)).rgb;\n" + " normal = float3(normal.x, normal.z, -normal.y); \n"; // convert Ogre to MW coordinate system }