Skip to content

fix(ll): reduce sky dither noise#2342

Merged
alandtse merged 1 commit into
devfrom
fix-ll-sky-dither
May 15, 2026
Merged

fix(ll): reduce sky dither noise#2342
alandtse merged 1 commit into
devfrom
fix-ll-sky-dither

Conversation

@jiayev
Copy link
Copy Markdown
Collaborator

@jiayev jiayev commented May 14, 2026

This pull request updates the sky rendering logic in Sky.hlsl to improve how noise and color blending are handled, especially in relation to the ENABLE_LL flag. The changes refine how noise gradients are applied and how vertex colors are computed for more accurate and flexible sky shading.

Sky rendering improvements:

  • The calculation of the vertex color now conditionally adds the noiseGrad value to input.Color.xyz only if ENABLE_LL is true, allowing for more control over color blending in different rendering modes.
  • The addition of the noise gradient to the output color is now also conditional on ENABLE_LL, ensuring that noise is only applied when appropriate.
  • When the TEX flag is not defined, the noise gradient is now added directly to the input color before calling Color::Sky, changing the order of operations for improved gradient smoothing.

Summary by CodeRabbit

  • Improvements
    • Enhanced sky rendering visual quality through refined dithering effects in certain rendering scenarios.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

📝 Walkthrough

Walkthrough

The PR adjusts how noise gradients are applied in the sky pixel shader's legacy dithering path. The TEX case now conditionally includes noiseGrad in the sunGlareColor computation when ENABLE_LL is enabled, and applies noiseGrad to the final output only when ENABLE_LL is disabled. The non-TEX case moves noiseGrad application inside the Color::Sky() call rather than after it.

Changes

Sky Dithering Noise Gradient Logic

Layer / File(s) Summary
Dithering Noise Gradient Conditional Logic
package/Shaders/Sky.hlsl
Updated DITHER + TEX sky shading to conditionally incorporate noiseGrad into the sky color computation based on ENABLE_LL state, controlling when noise is applied to sunGlareColor vs. final output. Non-TEX path also modified to apply noiseGrad inside the Color::Sky call rather than after.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • community-shaders/skyrim-community-shaders#2090: Both PRs modify package/Shaders/Sky.hlsl's sky/dithering composition logic—specifically the TEX/DITHER sun glare/noiseGrad handling—so the changes are directly related at the shader code level.

Suggested reviewers

  • doodlum

Poem

🐰 A shader tweak, so small and neat,
Where noise and light now gracefully greet,
The ENABLE flag doth guide the way,
Where dithering blooms in morning's ray. ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'fix(ll): reduce sky dither noise' directly and clearly relates to the main change: adjusting how sky noise dithering is applied based on the ENABLE_LL flag in the shader.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-ll-sky-dither

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

No actionable suggestions for changed features.

@alandtse alandtse changed the title fix(ll): reduce sky dither noise under ll fix(ll): reduce sky dither noise May 15, 2026
@alandtse alandtse merged commit 6c068be into dev May 15, 2026
16 checks passed
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request May 16, 2026
@jiayev jiayev deleted the fix-ll-sky-dither branch May 22, 2026 02:37
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.

3 participants