From 8c7469d210948a97dd08b4aed71a306227a4e02d Mon Sep 17 00:00:00 2001 From: "bre..ns" Date: Fri, 1 Jul 2011 17:53:21 +0000 Subject: [PATCH] fixed a bug with normals in TerrainLighting material git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7796 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.frag | 2 +- engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.vert | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.frag b/engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.frag index c06cca739..c4d3bdfb0 100644 --- a/engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.frag +++ b/engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.frag @@ -648,7 +648,7 @@ void main(){ //--------------------- // normal calculations //--------------------- - #if defined(NORMALMAP) || defined(NORMALMAP_1) || defined(NORMALMAP_2) || defined(NORMALMAP_3) + #if defined(NORMALMAP) || defined(NORMALMAP_1) || defined(NORMALMAP_2) || defined(NORMALMAP_3) || defined(NORMALMAP_4) || defined(NORMALMAP_5) || defined(NORMALMAP_6) || defined(NORMALMAP_7) || defined(NORMALMAP_8) || defined(NORMALMAP_9) || defined(NORMALMAP_10) || defined(NORMALMAP_11) #ifdef TRI_PLANAR_MAPPING vec3 normal = calculateNormalTriPlanar(wNormal, wVertex, texCoord); #else diff --git a/engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.vert b/engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.vert index eded0ee13..b73e7e210 100644 --- a/engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.vert +++ b/engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.vert @@ -61,7 +61,7 @@ void main(){ //-------------------------- // specific to normal maps: //-------------------------- - #if defined(NORMALMAP) || defined(NORMALMAP_1) || defined(NORMALMAP_2) || defined(NORMALMAP_3) + #if defined(NORMALMAP) || defined(NORMALMAP_1) || defined(NORMALMAP_2) || defined(NORMALMAP_3) || defined(NORMALMAP_4) || defined(NORMALMAP_5) || defined(NORMALMAP_6) || defined(NORMALMAP_7) || defined(NORMALMAP_8) || defined(NORMALMAP_9) || defined(NORMALMAP_10) || defined(NORMALMAP_11) vec3 wvTangent = normalize(g_NormalMatrix * inTangent.xyz); vec3 wvBinormal = cross(wvNormal, wvTangent);