aboutsummaryrefslogtreecommitdiff
path: root/src/client/shadows/dynamicshadows.h
diff options
context:
space:
mode:
authorx2048 <codeforsmile@gmail.com>2022-04-07 22:13:50 +0200
committerGitHub <noreply@github.com>2022-04-07 22:13:50 +0200
commit48f7c5603e5b2dfca941d228e76e452bc269a1fa (patch)
tree7983bb05e762792e38ba22a59e8718cac5381747 /src/client/shadows/dynamicshadows.h
parent0b5b2b2633609f646a534d353a2c587af4be46fa (diff)
downloadminetest-48f7c5603e5b2dfca941d228e76e452bc269a1fa.tar.gz
minetest-48f7c5603e5b2dfca941d228e76e452bc269a1fa.tar.bz2
minetest-48f7c5603e5b2dfca941d228e76e452bc269a1fa.zip
Adjust shadowmap distortion to use entire SM texture (#12166)
Diffstat (limited to 'src/client/shadows/dynamicshadows.h')
-rw-r--r--src/client/shadows/dynamicshadows.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/shadows/dynamicshadows.h b/src/client/shadows/dynamicshadows.h
index 03dd36014..70574aa6c 100644
--- a/src/client/shadows/dynamicshadows.h
+++ b/src/client/shadows/dynamicshadows.h
@@ -29,12 +29,14 @@ class Client;
struct shadowFrustum
{
- float zNear{0.0f};
- float zFar{0.0f};
- float length{0.0f};
+ f32 zNear{0.0f};
+ f32 zFar{0.0f};
+ f32 length{0.0f};
+ f32 radius{0.0f};
core::matrix4 ProjOrthMat;
core::matrix4 ViewMat;
v3f position;
+ v3f player;
v3s16 camera_offset;
};
@@ -57,6 +59,8 @@ public:
return direction;
};
v3f getPosition() const;
+ v3f getPlayerPos() const;
+ v3f getFuturePlayerPos() const;
/// Gets the light's matrices.
const core::matrix4 &getViewMatrix() const;