Repository navigation
The water no longer sets the sun's split range, and a split no wider than a metre is padded - #551
Merged
Merged
Conversation
…s its depth is #548 gave each split's fit at least a metre of depth along the light. The same fit divides by the receivers' extent across the light too: the least squares line's error by their width (size.x), the ortho fit by their x and y ranges, and the perspective fit by its y range (ynear - yfar). Receivers that collapse to a line or a point in the light's view, as a thin sliver of geometry seen edge on does, left infinities in the split's matrix. Since #548 a NaN error takes the ortho fit, which made the zero-width case reach al_ortho with equal left and right planes. The x and y extents take the same metre as the depth, about their middle. A split wider than that fits as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ivers generateSunShadow takes the split range from the receivers in view: twice the farthest, 16 to 512 m, at most the draw distance. The water's field is among them (getVisibleExtents), and it reaches past the draw distance, so any view of the sea put the farthest receiver at the draw distance and stretched every split as far as the range could go, whatever else was in view. The near cascades lost their resolution to water, whose shadow only dims its glint. The view-wide point cloud that sets the range now leaves the water out (getVisibleExtents and getVisiblePointCloud take whether to count it, on by default). Each split's own cloud still counts it, so a split over open sea is fitted to the water as before. With nothing but water in view the range takes its floor, 16 m, where the empty cloud used to end the pass without sun shadows. waterReceivesShadows is the test both use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 40 minutes. View limit details
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two repairs to the sun's cascades that keep Linden's fit and its split range rule, for a world whose water reaches past the draw distance.
generateSunShadowtakes the split range from the receivers in view: twice the farthest, 16 to 512 m, at most the draw distance. The water's field reaches past the draw distance, so any view of the sea put the farthest receiver at the draw distance and stretched every split as far as the range could go, whatever else was in view; the near cascades lost their resolution to water, whose shadow only dims its glint. The view-wide point cloud that sets the range now leaves the water out (getVisibleExtentsandgetVisiblePointCloudtake whether to count it, on by default), while each split's own cloud still counts it, so a split over open sea is fitted to the water as before. With nothing but water in view the range takes its 16 m floor, where the empty cloud used to end the pass without sun shadows.waterReceivesShadowsis the test both use.al_orthowith equal left and right planes. The x and y extents take the same metre.Linden's rule itself, twice the farthest receiver, 16 to 512 m, at most the draw distance, is unchanged; only which receivers it counts.
Testing.
pipeline.cppcompiles clean with the viewer's own flags (vs2026-os, RelWithDebInfo,/W3 /WX). In-world check owed: sharper shadows near the camera by the shore or on a boat with the sea in view, and over open sea alone the shadows ending around 16 m.🤖 Generated with Claude Code