Skip to content

Conversation

capdevon
Copy link
Contributor

@capdevon capdevon commented Jun 23, 2025

This PR refactors the DirectionalLightShadowRenderer class to improve code clarity, efficiency, and shadow rendering quality:

  • Improves documentation and comments for better maintainability and understanding.
  • Renames and clarifies variable purposes, including enhanced comments for splits, splitsArray, and reusable vectors.
  • Uses final for reusable arrays and temporary vectors to reduce allocations.
  • Adds and documents the tempVec reusable vector.
  • Clarifies shadow stabilization logic with a dedicated flag and improved comments.
  • Updates parameter and method documentation for accuracy and readability.
  • Minor code cleanup and formatting for consistency.

These changes do not modify functionality but make the codebase easier to maintain and extend, while also promoting efficient memory usage and clearer intent in shadow rendering logic.

@yaRnMcDonuts yaRnMcDonuts added this to the v3.9.0 milestone Jun 24, 2025
*/
protected DirectionalLightShadowRenderer() {
super();
}

/**
* Creates a DirectionalLight shadow renderer. More info on the technique at <a
* href="https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch10.html">https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch10.html</a>
* Creates a DirectionalLight shadow renderer. This renderer implements the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the link? Still seems to work

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see, you've moved it to the top. Makes sense

@codex128 codex128 added the Refactoring and Cleanup This PR is all about improving code quality and javadoc. label Aug 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring and Cleanup This PR is all about improving code quality and javadoc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants