EEVEE Next: Subsurface Scattering #107407

Merged
Miguel Pozo merged 24 commits from pragma37/blender:pull-eevee-next-sss into main 2023-06-15 15:49:12 +02:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit 8dd009fabb - Show all commits

View File

@ -10,7 +10,10 @@
vec2 gbuffer_normal_pack(vec3 N)
{
N /= length_manhattan(N);
N.xy = (N.z >= 0.0) ? N.xy : ((1.0 - abs(N.yx)) * sign(N.xy));
vec2 _sign = sign(N.xy);
_sign.x = _sign.x == 0.0 ? 1.0 : _sign.x;
_sign.y = _sign.y == 0.0 ? 1.0 : _sign.y;
N.xy = (N.z >= 0.0) ? N.xy : ((1.0 - abs(N.yx)) * _sign);
N.xy = N.xy * 0.5 + 0.5;
return N.xy;
}