From 58a748dcd77d0caacc9d6ef7a7e7e073ac849ad3 Mon Sep 17 00:00:00 2001 From: omniscient <17525998+omnisci3nce@users.noreply.github.com> Date: Sat, 20 Jul 2024 19:47:25 +1000 Subject: resize viewport and fix skybox --- src/new_render/pbr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/new_render/pbr.c') diff --git a/src/new_render/pbr.c b/src/new_render/pbr.c index 46c621f..0a19ee1 100644 --- a/src/new_render/pbr.c +++ b/src/new_render/pbr.c @@ -71,7 +71,8 @@ void PBR_Execute(PBR_Storage* storage, Camera camera, TextureHandle shadowmap_te // Feed shader data Mat4 view, proj; - Camera_ViewProj(&camera, 1000, 1000, &view, &proj); + u32x2 dimensions = GPU_Swapchain_GetDimensions(); + Camera_ViewProj(&camera, (f32)dimensions.x, (f32)dimensions.y, &view, &proj); Binding_Camera camera_data = { .view = view, .projection = proj, .viewPos = vec4(camera.position.x, camera.position.y, -- cgit v1.2.3-70-g09d2