Fixed fov not being passed and invalid default zNear value in scene renderer.

This commit is contained in:
Patrick 2024-09-30 23:36:47 +02:00
parent c904353baf
commit 3f62ad3928
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@ void SceneRenderer::render(const SceneRendererRenderArgs& args)
-args.camera.position -args.camera.position
), ),
.viewToClip = glm::perspectiveFov( .viewToClip = glm::perspectiveFov(
/* fov = */ glm::radians(90.f), /* fov = */ args.camera.fovh,
/* width = */ static_cast<float>(args.targetTextureWidth), /* width = */ static_cast<float>(args.targetTextureWidth),
/* height = */ static_cast<float>(args.targetTextureHeight), /* height = */ static_cast<float>(args.targetTextureHeight),
/* zNear = */ args.camera.zNear, /* zNear = */ args.camera.zNear,

View File

@ -33,7 +33,7 @@ struct CameraOptions
float pitch = 0.f; float pitch = 0.f;
float yaw = 0.f; float yaw = 0.f;
float fovh = glm::radians(90.f); float fovh = glm::radians(90.f);
float zNear = 0.f; float zNear = 0.1f;
float zFar = 100.f; float zFar = 100.f;
}; };