feat(camera): add orthographic projection support #948
No reviewers
Labels
No labels
Context: Bug
Context: Enhancements
Platform: Android
Platform: Linux
Platform: Web
Platform: Windows
Platform: iOS
Platform: macOS
Release
Target: CI
Target: CLI
Target: Dependency
Target: Engine
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
SakulFlee/Orbital!948
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/renderer-orthographic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Phase 6: orthographic camera support.
CameraProjection::{Perspective, Orthographic}andProjectionMode.CameraDescriptorstoresprojection_modeandortho_height;aspectandfovyremain for perspective. ECS/camera descriptor fields are exposed to the debug editor.xmag/ymag→ aspect/height,znear/zfar→ clip planes). Perspectiveyfovis now consistently stored in degrees.sys_ortho_panandsys_ortho_zoomprovide view-plane panning, Q/E zoom and the existing look controls. The orthographic example uses them instead of the perspective controller.Examples/orthographicscene.Perspective remains the default.
Verification
cargo fmt --all -- --checkcargo clippyfor camera/ECS/app/facade/debug UI and all four examples with--all-targets -D warningscargo clippy -p orbital_importer_gltf --lib -- -D warningscargo test -p orbital_camera -p orbital_ecs_bridge -p orbital_importer_gltf -p orbital_debug_uicargo checkfortemplate_minimal,template_all_in_one, andtemplate_orthographicRefs #781, #583, #580.
Introduce CameraProjection::{Perspective, Orthographic} and a ProjectionMode selector on camera descriptors. The camera uniform keeps the same layout: the projection slot now holds either a perspective or orthographic matrix, so deferred world reconstruction, tiled light culling, frustum culling and CSM keep working without a second uniform path. Add orthographic descriptor fields to the ECS camera component and expose projection_mode to the debug editor. Import glTF orthographic cameras using xmag/ymag for height and aspect, and store perspective fovy consistently in degrees. Add projection/frustum unit tests, importer coverage and an Examples/orthographic scene.Smart test results
Result: PASS
Scope: full workspace
Reason: workspace-level change: Cargo.lock
Elapsed: 6m 38s
Workflow run
Overall: 455 tests, 445 passed, 0 failed, 10 skipped
Nextest: 444 tests, 444 passed, 0 failed, 0 skipped
Doctests: 11 tests, 1 passed, 0 failed, 10 skipped
Outcome charts are split between nextest and doctests. The timing chart covers nextest only.