Page MenuHome

Fix T74110: EEVEE Shadow Pass
ClosedPublic

Authored by Jeroen Bakker (jbakker) on Feb 24 2020, 10:48 AM.

Details

Summary

Shadow could penetrate occluded geometry. This patch adds a check to see
if the light is in the right location to light the pixel.

Diff Detail

Repository
rB Blender

Event Timeline

Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)

Missed file in previous commit
don't light background just like Cycles does.

source/blender/draw/engines/eevee/shaders/shadow_accum_frag.glsl
52

does cycles actually have this fallof? if not just use a step function.

Better matching with Cycles

source/blender/draw/engines/eevee/shaders/shadow_accum_frag.glsl
52

l_vector is not normalized. so i'm guessing the 1.5 factors are not correct.

Normalized the light_vector

This revision is now accepted and ready to land.Feb 27 2020, 3:15 PM
Jeroen Bakker (jbakker) marked 2 inline comments as done.Feb 27 2020, 3:53 PM
Jeroen Bakker (jbakker) added inline comments.
source/blender/draw/engines/eevee/shaders/shadow_accum_frag.glsl
52

Best result I got with

float light_input = smoothstep(1.5, -1.5, -dot(N, l_vector.xyz));

But it will leave artifacts near edges.

This revision was automatically updated to reflect the committed changes.