Revert "Fix T74110: EEVEE Shadow Pass"

This reverts commit 403bb357ae.
The old implementation matches cycles closer. See T74378
This commit is contained in:
2020-03-03 12:34:36 +01:00
parent ce2dc6ef2b
commit 40343a76c5
2 changed files with 2 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ void main()
float depth = texelFetch(depthBuffer, texel, 0).r;
if (depth == 1.0f) {
/* Early exit background does not receive shadows */
fragColor.r = 0.0;
fragColor.r = 1.0;
return;
}
@@ -40,7 +40,6 @@ void main()
vec3 worldPosition = transform_point(ViewMatrixInverse, viewPosition);
vec3 true_normal = normalize(cross(dFdx(viewPosition), dFdy(viewPosition)));
vec3 N = normal_view_to_world(true_normal);
for (int i = 0; i < MAX_LIGHT && i < laNumLight; i++) {
LightData ld = lights_data[i];
@@ -49,9 +48,8 @@ void main()
l_vector.xyz = ld.l_position - worldPosition;
l_vector.w = length(l_vector.xyz);
float light_input = smoothstep(0.2, -0.2, -dot(N, normalize(l_vector.xyz)));
float l_vis = light_shadowing(
ld, worldPosition, viewPosition, tracing_depth, true_normal, rand.x, true, light_input);
ld, worldPosition, viewPosition, tracing_depth, true_normal, rand.x, true, 1.0);
accum_light += l_vis;
}

View File

@@ -164,7 +164,6 @@ uniform mat4 ModelMatrixInverse;
#define normal_object_to_world(n) (transpose(mat3(ModelMatrixInverse)) * n)
#define normal_world_to_object(n) (transpose(mat3(ModelMatrix)) * n)
#define normal_world_to_view(n) (mat3(ViewMatrix) * n)
#define normal_view_to_world(n) (mat3(ViewMatrixInverse) * n)
#define point_object_to_ndc(p) (ViewProjectionMatrix * vec4((ModelMatrix * vec4(p, 1.0)).xyz, 1.0))
#define point_object_to_view(p) ((ViewMatrix * vec4((ModelMatrix * vec4(p, 1.0)).xyz, 1.0)).xyz)