mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
Fixing the normal map computation
This commit is contained in:
parent
f20e1a727e
commit
0e25b7bd35
2 changed files with 2 additions and 3 deletions
|
@ -154,8 +154,7 @@ vec3 fetchLightmapMap(vec2 uv) {
|
|||
vec3 normalizedTangent = normalize(<$interpolatedTangent$>.xyz);
|
||||
vec3 normalizedBitangent = normalize(cross(normalizedNormal, normalizedTangent));
|
||||
vec3 localNormal = <$fetchedNormal$>;
|
||||
<$normal$> = vec3(normalizedTangent * localNormal.x + normalizedBitangent * localNormal.y + normalizedNormal * localNormal.z);
|
||||
// <$normal$> = fetchedNormal;
|
||||
<$normal$> = vec3(normalizedTangent * localNormal.x + normalizedNormal * localNormal.y + normalizedBitangent * localNormal.z);
|
||||
}
|
||||
<@endfunc@>
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ void main(void) {
|
|||
vec4 color = vec4(evalSkyboxGlobalColor(
|
||||
cam._viewInverse,
|
||||
1.0,
|
||||
1.0,
|
||||
occlusionTex,
|
||||
fragPosition,
|
||||
fragNormal,
|
||||
albedo,
|
||||
|
|
Loading…
Reference in a new issue