Skip to content

feat: check feature compatibility (#1136)#1163

Merged
alandtse merged 16 commits into
community-shaders:devfrom
alandtse:fix_hitory
Jun 20, 2025
Merged

feat: check feature compatibility (#1136)#1163
alandtse merged 16 commits into
community-shaders:devfrom
alandtse:fix_hitory

Conversation

@alandtse
Copy link
Copy Markdown
Collaborator

@alandtse alandtse commented Jun 20, 2025

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

Summary by CodeRabbit

  • New Features

    • Introduced a categorized feature menu with collapsible headers for improved navigation.
    • Added support for icon-based action buttons in the UI, with options to toggle between icons and text.
    • Added a "Vanilla Ripples" toggle to Wetness Effects, with compatibility for external mods.
    • Implemented detailed feature issue detection and management, including UI for obsolete or incompatible features.
    • Added support for seasonal texture swaps in terrain and PBR systems.
    • Expanded shader random number utilities and introduced a modular BRDF library for shaders.
  • Improvements

    • Enhanced error handling and version checks during feature loading.
    • Improved theme customization with new color options and UI scaling.
    • Added utility functions for safe file deletion and robust file path management.
    • Refined shader validation workflow and build process for better efficiency and error reporting.
  • Documentation

    • Added and updated README files detailing shader validation, licensing, and icon usage.
  • Chores

    • Updated dependencies to include the "stb" package for image handling.
  • Style

    • Improved font rendering and UI layout for sharper, clearer presentation.
  • Bug Fixes

    • Fixed issues with terrain texture assignment and PBR detection to account for seasonal swaps.

alandtse and others added 16 commits June 14, 2025 15:28
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This allows using the build script for scripting and testing.
)

* ci: treat skipped hlsl validation as success

* chore: trigger cpp validation

* ci: allow cpp success without changes

* revert: "chore: trigger cpp validation"

This reverts commit dafb4b9.
…s#1099)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* feat: add raindrop ripples on water

* style: 🎨 apply clang-format changes

* feat: ripple effect now supports water parallax

* style: 🎨 apply clang-format changes

* fix: fix compilation errors

* fix: fix wrong type

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* chore: sync cache on defaults

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* style: 🎨 apply pre-commit.ci formatting

Automated formatting by clang-format, prettier, and other hooks.
See https://pre-commit.ci for details.

* fix: vanilla ripple display

* refactor:  add flowmap functions

* feat: add flow maps to ripples

* style: 🎨 apply pre-commit.ci formatting

Automated formatting by clang-format, prettier, and other hooks.
See https://pre-commit.ci for details.

* fix: fix ripple and splash flows

* fix: remove dupe GetFeatureModLink

* style: fix lint

* refactor: address further ai comments

* fix: avoid entropy collapse in ripple hash

* style: restore function names and lines

---------

Co-authored-by: TheRiverwoodModder <TheRiverwoodModder@users.noreply.github.com>
Co-authored-by: Alan Tse <alandtse@users.noreply.github.com>
Co-authored-by: Alan Tse <alandtse@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Full Icon framework & support.

* UI Text helper function for better looking large text

Function for crispier large text like titles. Helps subtly but does make a difference, especially when high-res icons are visible near text.

* Update Menu.cpp

* Update src/UIIconLoader.cpp

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Update src/UIIconLoader.cpp

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* Icon folder changes, fix for compile issue.

* Reorganise

* Update README.md

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fixes

* rabbit suggested fixes

* fix

* style: 🎨 apply pre-commit.ci formatting

Automated formatting by clang-format, prettier, and other hooks.
See https://pre-commit.ci for details.

* build fix

* Fixes

* Update Menu.cpp

* style: 🎨 apply pre-commit.ci formatting

Automated formatting by clang-format, prettier, and other hooks.
See https://pre-commit.ci for details.

* Licence tweaks

* Comment clean & Mipmap fixes

* Texture memory leak cleanup

* fixes

* style: 🎨 apply pre-commit.ci formatting

Automated formatting by clang-format, prettier, and other hooks.
See https://pre-commit.ci for details.

* style: 🎨 apply pre-commit.ci formatting

Automated formatting by clang-format, prettier, and other hooks.
See https://pre-commit.ci for details.

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces a comprehensive set of changes including new shader validation infrastructure (documentation, PowerShell script, CMake target, and workflow integration), a modular BRDF shader library, major UI enhancements with icon support and feature categorization, improved feature issue detection and management, new utility modules for file system and UI operations, and several feature-specific logic and settings updates.

Changes

File(s) / Path(s) Change Summary
.github/configs/README.md, .github/configs/generate-shader-configs.ps1 Added documentation and PowerShell script for shader validation config generation.
.github/workflows/build.yaml Restructured workflow: added jobs for change detection and shader validation, improved build logic, artifact retention, and version extraction.
CMakeLists.txt Added custom targets for shader config generation and shader preparation.
BuildRelease.bat Removed pause command at end of script.
README.md Added "Icons" section clarifying icon asset licenses.
package/Interface/CommunityShaders/Icons/Microsoft Icons/LICENSE Added MIT license file for Microsoft Icons.
vcpkg.json Added "stb" to dependencies.
package/Shaders/Common/BRDF.hlsli New file: modular BRDF functions for physically-based rendering.
package/Shaders/Common/PBR.hlsli Refactored: replaced local BRDF logic with calls to new BRDF namespace.
package/Shaders/Common/Random.hlsli Refactored pcg to use inout state; added float random number generators.
package/Shaders/Common/SharedData.hlsli Added EnableVanillaRipples and RaindropFxRange to WetnessEffectsSettings.
features/Wetness Effects/Shaders/WetnessEffects/WetnessEffects.hlsli Extended raindrop ripple logic, added debug/flow-aware functions, refined preprocessor conditions.
src/Feature.cpp, src/Feature.h Refactored feature loading/validation; added GetCategory() method.
src/FeatureIssues.cpp, src/FeatureIssues.h New: comprehensive feature issue tracking, UI, and developer test tools.
src/Menu.cpp, src/Menu.h UI overhaul: icon support, action button toggle, category headers, feature selection, expanded theme options.
src/State.cpp Feature issue scan after config load.
src/Utils/FileSystem.cpp, src/Utils/FileSystem.h New: file system path helpers and safe deletion utilities.
src/Utils/Game.cpp, src/Utils/Game.h Added GetSeasonalSwap for texture set seasonal variants.
src/Utils/UI.cpp, src/Utils/UI.h New: icon loading, styled text, category/section header drawing, RAII UI wrappers.
src/Features/CloudShadows.h, src/Features/DynamicCubemaps.h, src/Features/ExtendedMaterials.h,
src/Features/GrassCollision.h, src/Features/GrassLighting.h, src/Features/HairSpecular.h,
src/Features/IBL.h, src/Features/InteriorSunShadows.h, src/Features/InverseSquareLighting.h,
src/Features/LODBlending.h, src/Features/LightLimitFix.h, src/Features/ScreenSpaceGI.h,
src/Features/ScreenSpaceShadows.h, src/Features/SkySync.h, src/Features/Skylighting.h,
src/Features/SubsurfaceScattering.h, src/Features/TerrainBlending.h, src/Features/TerrainHelper.h,
src/Features/TerrainShadows.h, src/Features/TerrainVariation.h, src/Features/VolumetricLighting.h,
src/Features/WaterEffects.h, src/Features/WetnessEffects.h Added/overrode GetCategory() for feature categorization.
src/Features/TerrainHelper.cpp, src/TruePBR.cpp, src/Hooks.cpp Updated terrain/PBR logic to use seasonal texture swaps.
src/Features/WetnessEffects.cpp, package/Shaders/Common/SharedData.h,
features/Wetness Effects/Shaders/WetnessEffects/WetnessEffects.hlsli, src/Features/WetnessEffects.h Added vanilla ripple toggle, SoS compatibility, new UI, and settings serialization.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHubActions
    participant PowerShellScript
    participant hlslkit
    participant CMake
    participant Game

    User->>GitHubActions: Push or PR triggers workflow
    GitHubActions->>GitHubActions: check-changes job (detects file changes)
    GitHubActions->>CMake: cpp-build job (if needed)
    GitHubActions->>PowerShellScript: shader-validation job (if needed)
    PowerShellScript->>Game: (requires shader logs from game run)
    PowerShellScript->>hlslkit: Generate shader config YAMLs
    PowerShellScript-->>GitHubActions: Outputs configs for validation
    GitHubActions->>hlslkit: Validate shader compilation using configs
    hlslkit-->>GitHubActions: Reports validation results
    GitHubActions->>User: Uploads artifacts, reports status
Loading
sequenceDiagram
    participant Menu
    participant User
    participant Feature
    participant FeatureIssues

    User->>Menu: Open settings UI
    Menu->>Feature: Query feature list
    Feature->>Menu: Return features with categories
    Menu->>Menu: Group features by category, display headers
    User->>Menu: Select feature or category
    Menu->>Feature: Show feature settings or issues
    FeatureIssues->>Menu: If issues exist, show "Feature Issues" menu
    User->>Menu: Interact with icon buttons (save, load, clear cache)
    Menu->>Menu: Perform actions, show tooltips/icons
Loading

Possibly related PRs

Suggested reviewers

  • doodlum

Poem

(\(\
( -.-)
o_(")(")

A hop, a skip, a shader’s twist,
New icons gleam, no feature missed.
Categories bloom in tidy rows,
With ripples, swaps, and BRDF glows.
The build now checks and shaders test—
This bunny thinks the code’s the best!
🥕✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between edad7a9 and 230f247.

⛔ Files ignored due to path filters (7)
  • package/Interface/CommunityShaders/Icons/Community Shaders Logo/cs-logo.png is excluded by !**/*.png
  • package/Interface/CommunityShaders/Icons/Microsoft Icons/clear-cache.png is excluded by !**/*.png
  • package/Interface/CommunityShaders/Icons/Microsoft Icons/clear-disk.png is excluded by !**/*.png
  • package/Interface/CommunityShaders/Icons/Microsoft Icons/load-settings.png is excluded by !**/*.png
  • package/Interface/CommunityShaders/Icons/Microsoft Icons/save-settings.png is excluded by !**/*.png
  • package/Shaders/Lighting.hlsl is excluded by !**/*.hlsl
  • package/Shaders/Water.hlsl is excluded by !**/*.hlsl
📒 Files selected for processing (54)
  • .github/configs/README.md (1 hunks)
  • .github/configs/generate-shader-configs.ps1 (1 hunks)
  • .github/workflows/build.yaml (7 hunks)
  • BuildRelease.bat (0 hunks)
  • CMakeLists.txt (2 hunks)
  • README.md (1 hunks)
  • features/Wetness Effects/Shaders/WetnessEffects/WetnessEffects.hlsli (4 hunks)
  • package/Interface/CommunityShaders/Icons/Microsoft Icons/LICENSE (1 hunks)
  • package/Shaders/Common/BRDF.hlsli (1 hunks)
  • package/Shaders/Common/PBR.hlsli (10 hunks)
  • package/Shaders/Common/Random.hlsli (2 hunks)
  • package/Shaders/Common/SharedData.hlsli (1 hunks)
  • src/Feature.cpp (3 hunks)
  • src/Feature.h (1 hunks)
  • src/FeatureIssues.cpp (1 hunks)
  • src/FeatureIssues.h (1 hunks)
  • src/Features/CloudShadows.h (1 hunks)
  • src/Features/DynamicCubemaps.h (1 hunks)
  • src/Features/ExtendedMaterials.h (1 hunks)
  • src/Features/GrassCollision.h (1 hunks)
  • src/Features/GrassLighting.h (1 hunks)
  • src/Features/HairSpecular.h (1 hunks)
  • src/Features/IBL.h (1 hunks)
  • src/Features/InteriorSunShadows.h (1 hunks)
  • src/Features/InverseSquareLighting.h (1 hunks)
  • src/Features/LODBlending.h (1 hunks)
  • src/Features/LightLimitFix.h (1 hunks)
  • src/Features/ScreenSpaceGI.h (1 hunks)
  • src/Features/ScreenSpaceShadows.h (1 hunks)
  • src/Features/SkySync.h (1 hunks)
  • src/Features/Skylighting.h (1 hunks)
  • src/Features/SubsurfaceScattering.h (1 hunks)
  • src/Features/TerrainBlending.h (1 hunks)
  • src/Features/TerrainHelper.cpp (2 hunks)
  • src/Features/TerrainHelper.h (1 hunks)
  • src/Features/TerrainShadows.h (1 hunks)
  • src/Features/TerrainVariation.h (1 hunks)
  • src/Features/VolumetricLighting.h (1 hunks)
  • src/Features/WaterEffects.h (1 hunks)
  • src/Features/WetnessEffects.cpp (5 hunks)
  • src/Features/WetnessEffects.h (5 hunks)
  • src/Hooks.cpp (1 hunks)
  • src/Menu.cpp (20 hunks)
  • src/Menu.h (3 hunks)
  • src/State.cpp (2 hunks)
  • src/TruePBR.cpp (3 hunks)
  • src/Util.h (1 hunks)
  • src/Utils/FileSystem.cpp (1 hunks)
  • src/Utils/FileSystem.h (1 hunks)
  • src/Utils/Game.cpp (1 hunks)
  • src/Utils/Game.h (1 hunks)
  • src/Utils/UI.cpp (2 hunks)
  • src/Utils/UI.h (2 hunks)
  • vcpkg.json (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@alandtse alandtse merged commit fb52eae into community-shaders:dev Jun 20, 2025
3 of 5 checks passed
This was referenced Nov 17, 2025
This was referenced Dec 25, 2025
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.

7 participants