feat(rendering): distance fog and config-derived far plane
This commit is contained in:
@@ -10,6 +10,7 @@ public sealed class Camera
|
||||
public float Yaw { get; private set; } = -90f; // degrees; -90 looks down -Z
|
||||
public float Pitch { get; private set; } // degrees
|
||||
public float Fov { get; set; } = 60f; // degrees
|
||||
public float FarPlane { get; set; } = 100f; // world units
|
||||
public float AspectRatio { get; set; }
|
||||
|
||||
public Vector3 Front { get; private set; } = -Vector3.UnitZ;
|
||||
@@ -36,7 +37,7 @@ public sealed class Camera
|
||||
|
||||
public Matrix4 GetProjectionMatrix() =>
|
||||
Matrix4.CreatePerspectiveFieldOfView(
|
||||
MathHelper.DegreesToRadians(this.Fov), this.AspectRatio, 0.1f, 100f);
|
||||
MathHelper.DegreesToRadians(this.Fov), this.AspectRatio, 0.1f, this.FarPlane);
|
||||
|
||||
private void UpdateVectors()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user