Skip to content

fix(ibl): disable skyibl in interior#2427

Merged
jiayev merged 3 commits into
devfrom
fix-ibl-effect-interior
May 28, 2026
Merged

fix(ibl): disable skyibl in interior#2427
jiayev merged 3 commits into
devfrom
fix-ibl-effect-interior

Conversation

@jiayev
Copy link
Copy Markdown
Collaborator

@jiayev jiayev commented May 27, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Prevented sky/IBL contributions (including sky specular) from affecting interior/enclosed areas.
  • Refactor

    • Improved lighting composition by splitting directional and ambient contributions and adding helper routines for more accurate effect lighting.
  • Chores

    • Bumped Image-Based Lighting feature version to 1-1-1.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3b92646a-64b1-40ae-82f6-96599627dbec

📥 Commits

Reviewing files that changed from the base of the PR and between 0a9afe5 and e1f7e67.

📒 Files selected for processing (1)
  • features/IBL/Shaders/Features/ImageBasedLighting.ini
✅ Files skipped from review due to trivial changes (1)
  • features/IBL/Shaders/Features/ImageBasedLighting.ini

📝 Walkthrough

Walkthrough

This PR prevents sky and image-based lighting contributions inside interior spaces by gating IBL and dynamic cubemap sky/specular via SharedData::InInterior, and adds Effect.hlsl helpers to split ambient and directional lighting used by deferred composition.

Changes

Interior sky gating and lighting composition

Layer / File(s) Summary
Feature-level interior sky gating
features/IBL/Shaders/IBL/IBL.hlsli, features/Dynamic Cubemaps/Shaders/DynamicCubemaps/DynamicCubemaps.hlsli
GetSkyIBLColor and GetSkyIBLColorOccluded early-return 0 when SharedData::InInterior is true; GetDynamicCubemapSpecularIrradiance and GetDynamicCubemap force skySpecular = 0 in interior paths. Include-guard line moves are non-semantic.
Runtime interior gating with effect lighting refactoring
package/Shaders/Effect.hlsl, package/Shaders/DeferredCompositeCS.hlsl, features/IBL/Shaders/Features/ImageBasedLighting.ini
Adds GetEffectAmbientLighting and ExtractEffectLighting to compute ambient and directional components (with optional diffuse IBL). GetLightingColor / GetLightingShadow use these helpers; deferred composite replaces a compile-time INTERIOR branch with a runtime SharedData::InInterior check that zeros skySpecular after SKYLIGHTING modulation. INI version bumped to 1-1-1.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • doodlum
  • alandtse
  • Dlizzio

Poem

🐰 In halls where torches softly glow,

I hush the sky's reflected show,
I split the light, ambient and bold,
And guard the rooms from sky's bright gold.
Hop, patch, compile — behold the fold!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main objective of the pull request: disabling sky-based IBL (image-based lighting) in interior spaces.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-ibl-effect-interior

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

github-actions Bot commented May 27, 2026

No actionable suggestions for changed features.

@jiayev jiayev merged commit 2a4442e into dev May 28, 2026
15 checks passed
IgorAlanAlbuquerque pushed a commit to IgorAlanAlbuquerque/skyrim-community-shaders that referenced this pull request May 29, 2026
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.

2 participants