diff options
author | lawnjelly <lawnjelly@gmail.com> | 2020-01-21 18:39:16 +0000 |
---|---|---|
committer | lawnjelly <lawnjelly@gmail.com> | 2020-01-22 18:22:00 +0000 |
commit | eaf8e5ce52331d05ee117c21e114ab0990dd3a9b (patch) | |
tree | 3de2610cfe1cbb042a3b7273d571762142d10085 /core/math/vector3.cpp | |
parent | 11260fb87f393e56692e6ba063609b5993d8d5f6 (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