Shadow stuff

This commit is contained in:
2025-07-18 23:51:57 +02:00
parent 1b339f087b
commit 2f6ca9d15b

View File

@@ -1,7 +1,7 @@
calc_tight_light_projection :: (camera: Camera, light_direction: Vector3) -> Matrix4 {
// View space camera frustum
aspect_ratio := cast(float)engine.renderer.render_target_height / cast(float)engine.renderer.render_target_width;
frustum := get_frustum(camera.fov, aspect_ratio, camera.z_near-20.0, camera.z_far+20);
frustum := get_frustum(camera.fov, aspect_ratio, camera.z_near, camera.z_far);
// View frustum back to world space
success :, inv_camera_view := inverse(camera.view_matrix);
@@ -122,4 +122,4 @@ sync_engine_buffers :: () {
}
}
}
}
}