1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-21 21:39:40 +00:00

fixed the terrain normals - they had to be adjusted because we use Morrowind's coordinate system

This commit is contained in:
scrawl 2012-02-28 17:18:07 +01:00
parent abcf25ead2
commit f55905609f
2 changed files with 5 additions and 3 deletions

View file

@ -31,7 +31,7 @@ namespace MWRender
TerrainMaterialGeneratorB::SM2Profile* matProfile = TerrainMaterialGeneratorB::SM2Profile* matProfile =
static_cast<TerrainMaterialGeneratorB::SM2Profile*>(activeProfile); static_cast<TerrainMaterialGeneratorB::SM2Profile*>(activeProfile);
matProfile->setLightmapEnabled(false); // this doesn't disable the lightmap, although it should ?? matProfile->setLightmapEnabled(false);
matProfile->setReceiveDynamicShadowsEnabled(false); matProfile->setReceiveDynamicShadowsEnabled(false);
matProfile->setLayerNormalMappingEnabled(false); matProfile->setLayerNormalMappingEnabled(false);
matProfile->setLayerParallaxMappingEnabled(false); matProfile->setLayerParallaxMappingEnabled(false);

View file

@ -196,7 +196,8 @@ namespace Ogre
// count the texture units free // count the texture units free
uint8 freeTextureUnits = 16; uint8 freeTextureUnits = 16;
// lightmap // lightmap
--freeTextureUnits; if (mLightmapEnabled)
--freeTextureUnits;
// normalmap // normalmap
--freeTextureUnits; --freeTextureUnits;
// colourmap // colourmap
@ -1019,7 +1020,8 @@ namespace Ogre
{ {
outStream << outStream <<
// global normal // 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
} }