summaryrefslogtreecommitdiff
path: root/core/math/vector3.cpp
diff options
context:
space:
mode:
authorlawnjelly <lawnjelly@gmail.com>2020-01-21 18:39:16 +0000
committerlawnjelly <lawnjelly@gmail.com>2020-01-22 18:22:00 +0000
commiteaf8e5ce52331d05ee117c21e114ab0990dd3a9b (patch)
tree3de2610cfe1cbb042a3b7273d571762142d10085 /core/math/vector3.cpp
parent11260fb87f393e56692e6ba063609b5993d8d5f6 (diff)
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.
Diffstat (limited to 'core/math/vector3.cpp')
0 files changed, 0 insertions, 0 deletions