fixed a bug with normals in TerrainLighting material
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7796 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
108e124323
commit
8c7469d210
@ -648,7 +648,7 @@ void main(){
|
|||||||
//---------------------
|
//---------------------
|
||||||
// normal calculations
|
// 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
|
#ifdef TRI_PLANAR_MAPPING
|
||||||
vec3 normal = calculateNormalTriPlanar(wNormal, wVertex, texCoord);
|
vec3 normal = calculateNormalTriPlanar(wNormal, wVertex, texCoord);
|
||||||
#else
|
#else
|
||||||
|
@ -61,7 +61,7 @@ void main(){
|
|||||||
//--------------------------
|
//--------------------------
|
||||||
// specific to normal maps:
|
// 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 wvTangent = normalize(g_NormalMatrix * inTangent.xyz);
|
||||||
vec3 wvBinormal = cross(wvNormal, wvTangent);
|
vec3 wvBinormal = cross(wvNormal, wvTangent);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user