|
|
@ -78,7 +78,9 @@ void main(){ |
|
|
|
vec3 viewDir = normalize(g_CameraPosition - wPosition); |
|
|
|
vec3 viewDir = normalize(g_CameraPosition - wPosition); |
|
|
|
|
|
|
|
|
|
|
|
#if defined(NORMALMAP) || defined(PARALLAXMAP) |
|
|
|
#if defined(NORMALMAP) || defined(PARALLAXMAP) |
|
|
|
mat3 tbnMat = mat3(wTangent.xyz, wTangent.w * cross( (wNormal), (wTangent.xyz)), wNormal.xyz); |
|
|
|
vec3 tan = normalize(wTangent.xyz); |
|
|
|
|
|
|
|
vec3 norm = normalize(wNormal); |
|
|
|
|
|
|
|
mat3 tbnMat = mat3(tan, wTangent.w * cross(norm, tan), norm.xyz); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if (defined(PARALLAXMAP) || (defined(NORMALMAP_PARALLAX) && defined(NORMALMAP))) |
|
|
|
#if (defined(PARALLAXMAP) || (defined(NORMALMAP_PARALLAX) && defined(NORMALMAP))) |
|
|
|