summaryrefslogtreecommitdiffstats
path: root/core/math/camera_matrix.h
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-01-20 00:10:21 +0100
committerGitHub <noreply@github.com>2021-01-20 00:10:21 +0100
commit8a6d4dd5ed770f4dc464bbc6af912b96c63bbc2c (patch)
tree357c7089c986be1f7d9a97e275424ffc326c6a8d /core/math/camera_matrix.h
parentf768d8651687cd80da85043c4446b9e0a50f39ef (diff)
parent099dee35f47db3e293cb8e60287ffe6a44f3d5d4 (diff)
downloadredot-engine-8a6d4dd5ed770f4dc464bbc6af912b96c63bbc2c.tar.gz
Merge pull request #45023 from reduz/optimize-shader-vgpr1
Shader optimizations to reduce VGPR usage and increase occupancy
Diffstat (limited to 'core/math/camera_matrix.h')
-rw-r--r--core/math/camera_matrix.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/math/camera_matrix.h b/core/math/camera_matrix.h
index 03068bc7ea..3f327d3bc4 100644
--- a/core/math/camera_matrix.h
+++ b/core/math/camera_matrix.h
@@ -59,6 +59,7 @@ struct CameraMatrix {
void set_orthogonal(real_t p_size, real_t p_aspect, real_t p_znear, real_t p_zfar, bool p_flip_fov = false);
void set_frustum(real_t p_left, real_t p_right, real_t p_bottom, real_t p_top, real_t p_near, real_t p_far);
void set_frustum(real_t p_size, real_t p_aspect, Vector2 p_offset, real_t p_near, real_t p_far, bool p_flip_fov = false);
+ void adjust_perspective_znear(real_t p_new_znear);
static real_t get_fovy(real_t p_fovx, real_t p_aspect) {
return Math::rad2deg(Math::atan(p_aspect * Math::tan(Math::deg2rad(p_fovx) * 0.5)) * 2.0);