godot/core/math
lawnjelly eaf8e5ce52 Change CameraMatrix::get_viewport_size to get_viewport_half_extents
Fixes #26637.
Fixes #19900.

The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2.

Code which called this function has also been modified accordingly.

This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width.

It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-22 18:22:00 +00:00
..
SCsub Move CryptoCore to it's own folder. 2019-08-19 16:31:05 +02:00
a_star.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
a_star.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
aabb.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
aabb.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
audio_frame.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
audio_frame.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
basis.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
basis.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
bsp_tree.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
bsp_tree.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
camera_matrix.cpp Change CameraMatrix::get_viewport_size to get_viewport_half_extents 2020-01-22 18:22:00 +00:00
camera_matrix.h Change CameraMatrix::get_viewport_size to get_viewport_half_extents 2020-01-22 18:22:00 +00:00
delaunay.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
disjoint_set.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
disjoint_set.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
expression.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
expression.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
face3.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
face3.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
geometry.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
geometry.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
math_defs.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
math_fieldwise.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
math_fieldwise.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
math_funcs.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
math_funcs.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
octree.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
plane.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
plane.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
quat.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
quat.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
quick_hull.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
quick_hull.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
random_number_generator.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
random_number_generator.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
random_pcg.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
random_pcg.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
rect2.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
rect2.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
transform.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
transform.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
transform_2d.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
transform_2d.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
triangle_mesh.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
triangle_mesh.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
triangulate.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
triangulate.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
vector2.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
vector2.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
vector3.cpp Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
vector3.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00