Skip to content

The water no longer sets the sun's split range, and a split no wider than a metre is padded - #551

Merged
RyeMutt merged 2 commits into
developfrom
rye/ll-cascade-fixes
Oct 22, 2026
Merged

RyeMutt merged 2 commits into
developfrom
rye/ll-cascade-fixes

Conversation

@RyeMutt

@RyeMutt RyeMutt commented Oct 22, 2026

Copy link
Copy Markdown
Member

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.

  • The water no longer sets the sun's split range, only its splits' receivers. 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 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), 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. waterReceivesShadows is the test both use.
  • A split no wider than a metre across the light is padded as its depth is. A sun shadow fit's depth floor scales only its depth, and a fit that comes out NaN is ortho #548 gave each split's fit at least a metre of depth along the light. The fit also divides by the receivers' extent across it: the line fit's error by their width, the ortho fit by their x and y ranges, and the perspective fit by its y range. Receivers that collapse to a line or a point in the light's view left infinities in the split's matrix, and since A sun shadow fit's depth floor scales only its depth, and a fit that comes out NaN is ortho #548 a NaN error takes the ortho fit, which reached al_ortho with 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.cpp compiles 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

RyeMutt and others added 2 commits October 22, 2026 08:46
…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>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ab28601d-ffc0-416f-9d4a-19be1b495b4c
📥 Commits

Reviewing files that changed from the base of the PR and between 2ff4ef0 and 46fec9d.

📒 Files selected for processing: 2
  • indra/newview/pipeline.cpp
  • indra/newview/pipeline.h
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@RyeMutt
RyeMutt merged commit 85b8ea2 into develop Oct 22, 2026
17 checks passed
@RyeMutt
RyeMutt deleted the rye/ll-cascade-fixes branch October 22, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant