Skip to content

Conversation

@orange-cpp
Copy link
Owner

Summary

Updates perspective projection matrix calculation to ensure accurate Normalized Device Coordinates (NDC) generation. Replaces the manual calculation with a pre-existing omath function for improved efficiency and correctness. Adds a test to verify left-handed and right-handed projections are equivalent.

Changes

  • Replaces the custom perspective projection matrix calculation with the omath::mat_perspective_right_handed function.
  • Addresses an incorrect NDC calculation.
  • Adds a test case (UnitTestMatStandalone.Equanity) to ensure consistency between left-handed and right-handed projection matrices.

Corrects the NDC calculation in `world_to_screen` to improve accuracy.
Replaces custom perspective projection matrix calculation with `omath::mat_perspective_right_handed` for correctness and consistency.
Updates test cases and provides debugging information by printing view and projection matrices.
Addresses an issue in the feature/ndc_invalid_calc_fix branch.
@orange-cpp orange-cpp merged commit ed8afb0 into main Oct 21, 2025
3 checks passed
@orange-cpp orange-cpp deleted the feature/ndc_invalid_calc_fix branch October 22, 2025 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants