This commit is contained in:
2024-10-16 23:18:47 +02:00
parent a60fe82272
commit 221be140bf
6 changed files with 174 additions and 72 deletions

View File

@@ -35,7 +35,7 @@ Camera :: struct {
dirty : bool;
}
create_perspective_camera :: (position: Vector3 = .{}, fov: float, aspect: float, yaw: float = 0.0, pitch: float = 0.0, roll: float = 0.0, z_near: float = 0.1, z_far: float = 1000.0) -> Camera {
create_perspective_camera :: (position: Vector3 = .{}, fov: float, aspect: float, yaw: float = 0.0, pitch: float = 0.0, roll: float = 0.0, z_near: float = 0.1, z_far: float = 200.0) -> Camera {
camera : Camera;
camera.type = .PERSPECTIVE;
camera.world_up = .{0,1,0};
@@ -89,7 +89,6 @@ orthographic_lh_projection_matrix :: (left: float, right: float, bottom: float,
return m;
}
make_lh_projection_matrix :: (fov_vertical: float, aspect_ratio_horizontal_over_vertical: float, z_near: float, z_far: float, x_offset:=0.0, y_offset:=0.0, depth_range_01:=false) -> Matrix4 {
result := Matrix4_Identity;