Skip to content

chore(skylighting): minor tweaks#1478

Merged
doodlum merged 1 commit into
devfrom
skylighting-tweaks
Sep 16, 2025
Merged

chore(skylighting): minor tweaks#1478
doodlum merged 1 commit into
devfrom
skylighting-tweaks

Conversation

@doodlum
Copy link
Copy Markdown
Collaborator

@doodlum doodlum commented Sep 16, 2025

Summary by CodeRabbit

  • Improvements
    • Water appearance: Removed skylight influence from refraction color for more stable, consistent shallow-to-deep color transitions.
    • Skylighting tuning: Lowered minimum visibility thresholds so skylight effects remain perceptible in darker or lower-visibility scenes, enhancing overall scene illumination continuity.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 16, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Removed skylighting modulation from water refraction color in Water.hlsl. Adjusted Skylighting::Settings defaults by lowering MinDiffuseVisibility and MinSpecularVisibility from 0.25f to 0.1f. No public API/signature changes.

Changes

Cohort / File(s) Summary
Water shader refraction skylight removal
package/Shaders/Water.hlsl
Deleted the SKYLIGHTING-driven block in GetWaterDiffuseColor that sampled skylight and mixed it into refractionDiffuseColor; refraction now uses only distance-based lerp of shallow/deep colors. Removed VR/interior-specific skylight code path within that block.
Skylighting settings defaults
src/Features/Skylighting.h
Lowered default thresholds: Settings::MinDiffuseVisibility 0.25f → 0.1f; Settings::MinSpecularVisibility 0.25f → 0.1f. No other changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant F as Fragment
  participant W as Water Pixel Shader
  participant S as Skylighting (old)
  Note over F,W: Refraction color computation

  rect rgba(200,230,255,0.25)
  Note over W: Old flow (removed)
  F->>W: Shade pixel
  W->>W: Base refraction (shallow/deep lerp)
  W->>S: Sample skylight (SH eval, visibility)
  S-->>W: Skylight diffuse
  W->>W: Mix skylight into refraction
  W-->>F: Output color
  end

  rect rgba(200,255,200,0.25)
  Note over W: New flow
  F->>W: Shade pixel
  W->>W: Base refraction (shallow/deep lerp)
  W-->>F: Output color (no skylight modulation)
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • jiayev
  • alandtse

Poem

I skim the waves with shader grace,
Skylight set aside, a calmer face.
Refraction sings in blue and green,
Defaults dim to keep it clean.
Hops and taps—commit is tight,
A bunny nods: the water’s right. 🐇🌊

✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch skylighting-tweaks

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bb4de53 and bf606e8.

📒 Files selected for processing (2)
  • package/Shaders/Water.hlsl (0 hunks)
  • src/Features/Skylighting.h (1 hunks)

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 and usage tips.

@github-actions
Copy link
Copy Markdown

Using provided base ref: bb4de53
Using base ref: bb4de53
Base commit date: 2025-09-16T01:13:54+01:00 (Tuesday, September 16, 2025 01:13 AM)
No actionable suggestions for changed features.

@doodlum doodlum merged commit 1a52bc6 into dev Sep 16, 2025
12 of 13 checks passed
@github-actions
Copy link
Copy Markdown

✅ A pre-release build is available for this PR:
Download

@alandtse alandtse deleted the skylighting-tweaks branch February 6, 2026 05:20
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.

1 participant