Skip to content

Use camera projection consistently across renderers - #55

Merged
Lemiort merged 1 commit into
masterfrom
bugfix/25-shared-camera-projection
Oct 24, 2026
Merged

Lemiort merged 1 commit into
masterfrom
bugfix/25-shared-camera-projection

Conversation

@Lemiort

@Lemiort Lemiort commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Closes #25.

Problem

Forward and deferred mesh passes hard-coded a 30-degree FOV and 1..1000 clipping range, so camera FOV/near/far changes affected billboards and debug geometry but not meshes or deferred light volumes.

Summary

  • remove duplicated hard-coded projection helpers
  • use Camera::GetViewProjectionMatrix() in forward mesh rendering
  • use the same camera matrix in deferred geometry, stencil, point-light, and spotlight passes
  • use the light camera's own projection source for the spotlight shadow matrix
  • add regression tests for runtime FOV changes and near-plane clipping

Verification

  • cmake --build build/build/Release --target NEE math_migration_tests opengl_render_tests
  • ctest --test-dir build/build/Release -R "CameraProjection|OpenGLRender" --output-on-failure (12/12 passed)
  • ctest --test-dir build/build/Release --output-on-failure --no-tests=error (38/38 passed)

@Lemiort
Lemiort merged commit 28ff345 into master Oct 24, 2026
10 checks passed
@Lemiort
Lemiort deleted the bugfix/25-shared-camera-projection branch October 24, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[P1] Use consistent camera projection across renderers

1 participant