Add procedural skybox scene coverage

This commit is contained in:
2026-04-05 23:44:32 +08:00
parent be2013f3c4
commit 8151be0f45
27 changed files with 1092 additions and 5 deletions

View File

@@ -22,12 +22,22 @@ RenderCameraData BuildRenderCameraData(
cameraData.viewportWidth = viewportWidth;
cameraData.viewportHeight = viewportHeight;
cameraData.worldPosition = camera.transform().GetPosition();
cameraData.worldRight = camera.transform().GetRight();
cameraData.worldUp = camera.transform().GetUp();
cameraData.worldForward = camera.transform().GetForward();
cameraData.clearColor = camera.GetClearColor();
cameraData.perspectiveProjection =
camera.GetProjectionType() == Components::CameraProjectionType::Perspective;
cameraData.verticalFovRadians = camera.GetFieldOfView() * Math::DEG_TO_RAD;
cameraData.orthographicSize = camera.GetOrthographicSize();
cameraData.nearClipPlane = camera.GetNearClipPlane();
cameraData.farClipPlane = camera.GetFarClipPlane();
const Math::Matrix4x4 view = camera.transform().GetWorldToLocalMatrix();
const float aspect = viewportHeight > 0
? static_cast<float>(viewportWidth) / static_cast<float>(viewportHeight)
: 1.0f;
cameraData.aspectRatio = aspect;
Math::Matrix4x4 projection = Math::Matrix4x4::Identity();
if (camera.GetProjectionType() == Components::CameraProjectionType::Perspective) {