diff options
author | Juan Linietsky <reduzio@gmail.com> | 2020-08-12 22:21:01 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2020-08-13 11:28:45 -0300 |
commit | 079ca220e14669ef7c31c399985cd2c733af15bd (patch) | |
tree | a5a9d4a388b9913d098d058f06547de51e8dfeeb /core/math/camera_matrix.cpp | |
parent | 64d859df0c6ba51ea4c4841e0a1eb287c5079eae (diff) |
Added volumetric fog effect.
Diffstat (limited to 'core/math/camera_matrix.cpp')
-rw-r--r-- | core/math/camera_matrix.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/math/camera_matrix.cpp b/core/math/camera_matrix.cpp index 22ab83f358..c154d57a13 100644 --- a/core/math/camera_matrix.cpp +++ b/core/math/camera_matrix.cpp @@ -278,7 +278,7 @@ Vector2 CameraMatrix::get_viewport_half_extents() const { return Vector2(res.x, res.y); } -void CameraMatrix::get_far_plane_size(real_t &r_width, real_t &r_height) const { +Vector2 CameraMatrix::get_far_plane_half_extents() const { const real_t *matrix = (const real_t *)this->matrix; ///////--- Far Plane ---/////// Plane far_plane = Plane(matrix[3] - matrix[2], @@ -303,8 +303,7 @@ void CameraMatrix::get_far_plane_size(real_t &r_width, real_t &r_height) const { Vector3 res; far_plane.intersect_3(right_plane, top_plane, &res); - r_width = res.x; - r_height = res.y; + return Vector2(res.x, res.y); } bool CameraMatrix::get_endpoints(const Transform &p_transform, Vector3 *p_8points) const { |