summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/forward_mobile
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-08 07:16:25 +0200
committerGitHub <noreply@github.com>2022-06-08 07:16:25 +0200
commit48dcafeed9d284d1cd872722d43735e973f18d57 (patch)
tree7e013bde2f3e24866b87dd01b50633313853a677 /servers/rendering/renderer_rd/forward_mobile
parent2e041f91fd1a38541f846930718f079adbe99cfb (diff)
parentb6649828cd7e78dc8ff05728179711fec5914862 (diff)
Merge pull request #61794 from clayjohn/VULKAN-viewport-size
Use RenderBuffer size instead of half extents for VIEWPORT_SIZE
Diffstat (limited to 'servers/rendering/renderer_rd/forward_mobile')
-rw-r--r--servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp
index 2ba5cabff2..9523bc8604 100644
--- a/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp
+++ b/servers/rendering/renderer_rd/forward_mobile/render_forward_mobile.cpp
@@ -485,9 +485,8 @@ void RenderForwardMobile::_render_scene(RenderDataRD *p_render_data, const Color
RENDER_TIMESTAMP("Setup 3D Scene");
- Vector2 vp_he = p_render_data->cam_projection.get_viewport_half_extents();
- scene_state.ubo.viewport_size[0] = vp_he.x;
- scene_state.ubo.viewport_size[1] = vp_he.y;
+ scene_state.ubo.viewport_size[0] = render_buffer->width;
+ scene_state.ubo.viewport_size[1] = render_buffer->height;
scene_state.ubo.directional_light_count = 0;
scene_state.ubo.opaque_prepass_threshold = 0.0;