diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-02-24 12:46:45 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-02-27 17:57:58 +0300 |
commit | 403bb357ae2b1d2561a0d77c96035ba54c197cbd (patch) | |
tree | 140f9338c9a662467969e186145019f52df9a549 /source/blender/draw/intern/shaders/common_view_lib.glsl | |
parent | f2b95b9eae2ee913c99cff7595527b18d8b49d0a (diff) |
Fix T74110: EEVEE Shadow Pass
Shadow could penetrate occluded geometry. This patch adds a check to see
if the light is in the right location to light the pixel.
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D6918
Diffstat (limited to 'source/blender/draw/intern/shaders/common_view_lib.glsl')
-rw-r--r-- | source/blender/draw/intern/shaders/common_view_lib.glsl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/draw/intern/shaders/common_view_lib.glsl b/source/blender/draw/intern/shaders/common_view_lib.glsl index 6605e1165d4..cfe79cb3ee0 100644 --- a/source/blender/draw/intern/shaders/common_view_lib.glsl +++ b/source/blender/draw/intern/shaders/common_view_lib.glsl @@ -164,6 +164,7 @@ 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) |