Skip to content

feat(terrain): foliage auto-population from generation rules#398

Merged
drsnuggles8 merged 1 commit into
masterfrom
feature/terrain-foliage-autopopulation
Jun 25, 2026
Merged

feat(terrain): foliage auto-population from generation rules#398
drsnuggles8 merged 1 commit into
masterfrom
feature/terrain-foliage-autopopulation

Conversation

@drsnuggles8

Copy link
Copy Markdown
Owner

No description provided.

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@drsnuggles8, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 5 minutes and 26 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2a8b87ff-b331-4048-a963-f3a681dc9c68

📥 Commits

Reviewing files that changed from the base of the PR and between 0c56611 and 07bff0e.

⛔ Files ignored due to path filters (1)
  • OloEditor/assets/tests/visual/FoliageGen_grassland.png is excluded by !**/*.png
📒 Files selected for processing (9)
  • OloEditor/SandboxProject/Assets/Scenes/FoliageGenerationTest.olo
  • OloEditor/SandboxProject/Sandbox.oloproj
  • OloEditor/src/Panels/SceneHierarchyPanel.cpp
  • OloEngine/src/OloEngine/Terrain/TerrainGenerator.cpp
  • OloEngine/src/OloEngine/Terrain/TerrainGenerator.h
  • OloEngine/tests/CMakeLists.txt
  • OloEngine/tests/Rendering/PropertyTests/FoliageGenerationEvidenceTest.cpp
  • OloEngine/tests/Terrain/TerrainGeneratorTest.cpp
  • docs/PROCEDURAL_TERRAIN.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Jun 25, 2026

Copy link
Copy Markdown

@drsnuggles8

Copy link
Copy Markdown
Owner Author

🤖 Self-review (finish-pr) @ 07bff0eea2004a071540f546203752ca30440519

Reviewed the full PR diff against master at high effort (single commit; engine + editor + tests + scene + docs).

  • Findings: 1 (the SonarCloud Quality-Gate blocker). No correctness bugs in the feature code: MakeFoliageLayersFromRules derives each emitted FoliageLayer's placement mask from the matching TerrainLayerRule (slope band clamped min(rule.Max, profile.ceiling) then re-clamped >= Min, so Max ≥ Min always holds), skips layers with no painting rule, and the editor button captures entity by value for an immediate-mode draw. Header includes FoliageLayer.h (IWYU-clean); tests are float-safe (std::isfinite/kEps, no float ==).
  • Fixed: Quality Gate was failing on D Reliability Rating on New Code — the lone reliability issue was cpp:S990 "Remove this use of getenv" at FoliageGenerationEvidenceTest.cpp:71. Dispositioned by marking the SonarCloud issue Accepted (not a code change): std::getenv("OLOENGINE_GOLDEN_REBASE") is the repo-wide golden-rebase idiom — byte-identical to WaterVisualEvidenceTest.cpp:117 and TerrainGenerationEvidenceTest.cpp:66 (the two sibling evidence tests this one mirrors) plus ~20 other uses incl. production. Diverging this one line would be inconsistent churn with no real reliability gain. Quality Gate now reports OK (new_reliability_rating → A); the GitHub check refreshes on the next SonarCloud decoration.
  • Dismissed: none.

Verification: rebuilt OloEngine-Tests (Debug) and ran the foliage suite locally — all 6 pass, incl. the live-GL FoliageGenerationEvidenceTest.GeneratedFoliageScattersAndRenders (full editor pipeline, asserts scattered instance count > 0 and grass-green pixel coverage). Committed golden FoliageGen_grassland.png confirms a vegetated frame.

@drsnuggles8 drsnuggles8 added the self-reviewed finish-pr self-review done label Jun 25, 2026
@drsnuggles8 drsnuggles8 merged commit dfa5d03 into master Jun 25, 2026
10 checks passed
@drsnuggles8 drsnuggles8 deleted the feature/terrain-foliage-autopopulation branch June 25, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

self-reviewed finish-pr self-review done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant