mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-12 01:22:41 +02:00
Adding a clamp to 0 to the computed y coordinate while unpacking the normal map
This commit is contained in:
parent
19c7502998
commit
85c18f1033
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ vec3 fetchNormalMap(vec2 uv) {
|
|||
// unpack normal, swizzle to get into hifi tangent space with Y axis pointing out
|
||||
vec2 t = 2.0 * (texture(normalMap, uv, TAA_TEXTURE_LOD_BIAS).rg - vec2(0.5, 0.5));
|
||||
vec2 t2 = t*t;
|
||||
return vec3(t.x, sqrt(1.0 - t2.x - t2.y), t.y);
|
||||
return vec3(t.x, sqrt(max(0.0, 1.0 - t2.x - t2.y)), t.y);
|
||||
}
|
||||
<@endif@>
|
||||
|
||||
|
|
Loading…
Reference in a new issue