From 4801bdf45aaaa9238bc52a157e1d25c9d477d81a Mon Sep 17 00:00:00 2001 From: Dmitry Kostenko Date: Sun, 20 Feb 2022 00:04:48 +0100 Subject: Correct normal bias for entities Remove use of magic constants. Apply cameraOffset Calculate distance projected on SM plane --- src/client/shadows/dynamicshadows.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client/shadows/dynamicshadows.h') diff --git a/src/client/shadows/dynamicshadows.h b/src/client/shadows/dynamicshadows.h index d8be66be8..03dd36014 100644 --- a/src/client/shadows/dynamicshadows.h +++ b/src/client/shadows/dynamicshadows.h @@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "irrlichttypes_bloated.h" #include #include "util/basic_macros.h" +#include "constants.h" class Camera; class Client; @@ -67,7 +68,7 @@ public: /// Gets the light's far value. f32 getMaxFarValue() const { - return farPlane; + return farPlane * BS; } -- cgit v1.2.3