Added PerspectiveCameraController

This commit is contained in:
Simon Lübeß
2021-08-04 19:23:29 +02:00
parent 0735aae74f
commit e04d058381
3 changed files with 137 additions and 4 deletions
@@ -78,7 +78,8 @@ namespace GlitchyEngine.Renderer
protected override void UpdateProjection()
{
Log.EngineLogger.Assert(_nearPlane < _farPlane, "The near plane must be smaller than the far plane.");
if(_projectionType == .Limited || _projectionType == .LimitedReversed)
Log.EngineLogger.AssertDebug(_nearPlane < _farPlane, "The near plane must be smaller than the far plane.");
switch(_projectionType)
{
@@ -91,7 +92,7 @@ namespace GlitchyEngine.Renderer
case .InfiniteReversed:
_projection = Matrix.ReversedInfinitePerspectiveProjection(_fovY, _aspect, _nearPlane);
default:
Log.EngineLogger.Assert(false, "Unknown projection type.");
Log.EngineLogger.AssertDebug(false, "Unknown projection type.");
}
}