diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-03-03 14:34:36 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-03-03 14:35:50 +0300 |
commit | 40343a76c56f924b2e38ad87940ca2a74dcc1bd3 (patch) | |
tree | 812cd148e79a54119bda6508cc1f5b82ab5c3a59 /source/blender/draw | |
parent | ce2dc6ef2bce1fdd038989e0a7841600daccfd49 (diff) |
Revert "Fix T74110: EEVEE Shadow Pass"
This reverts commit 403bb357ae2b1d2561a0d77c96035ba54c197cbd.
The old implementation matches cycles closer. See T74378
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/engines/eevee/shaders/shadow_accum_frag.glsl | 6 | ||||
-rw-r--r-- | source/blender/draw/intern/shaders/common_view_lib.glsl | 1 |
2 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/draw/engines/eevee/shaders/shadow_accum_frag.glsl b/source/blender/draw/engines/eevee/shaders/shadow_accum_frag.glsl index 5778f02f692..dd225959a47 100644 --- a/source/blender/draw/engines/eevee/shaders/shadow_accum_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/shadow_accum_frag.glsl @@ -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; } diff --git a/source/blender/draw/intern/shaders/common_view_lib.glsl b/source/blender/draw/intern/shaders/common_view_lib.glsl index cfe79cb3ee0..6605e1165d4 100644 --- a/source/blender/draw/intern/shaders/common_view_lib.glsl +++ b/source/blender/draw/intern/shaders/common_view_lib.glsl @@ -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) |