Skip to content

refactor(ui): add settings for shader block hotkeys#1624

Merged
doodlum merged 2 commits into
community-shaders:devfrom
midona-rhel:fix/shader-block-buttons
Dec 4, 2025
Merged

refactor(ui): add settings for shader block hotkeys#1624
doodlum merged 2 commits into
community-shaders:devfrom
midona-rhel:fix/shader-block-buttons

Conversation

@midona-rhel
Copy link
Copy Markdown
Contributor

@midona-rhel midona-rhel commented Dec 3, 2025

This change is intended to stop users from accidentally trying to hit shader block hotkeys. Instead this feature will only work when it is enabled under Advanced -> Shader Debugging, where there you need to enable it. You also have the option of rebinding the buttons for how to navigate the blocked shader.

Should resolve #1617

Summary by CodeRabbit

Release Notes

  • New Features
    • Added customizable shader blocking feature with dedicated hotkeys for navigating shader blocks
    • New "Shader Debug" section in Advanced Settings provides:
      • Toggle to enable/disable shader blocking functionality
      • Configurable hotkeys for navigating to previous and next shader blocks
    • Shader block navigation transitioned from developer-only mode to standard user-accessible settings with full customization

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Dec 3, 2025

Walkthrough

This PR refactors shader-blocking hotkey handling by replacing hardcoded VK_PRIOR/VK_NEXT keys with configurable hotkeys through the Settings system. Three new settings fields are added (ShaderBlockPrevKey, ShaderBlockNextKey, EnableShaderBlocking), paired with UI controls in Advanced Settings and input handling wired through the existing SettingsState pipeline.

Changes

Cohort / File(s) Summary
Settings Structure Extensions
src/Menu.h, src/Menu.cpp
Added three new Settings fields (ShaderBlockPrevKey, ShaderBlockNextKey, EnableShaderBlocking) and replaced direct shader-block key storage (priorShaderKey, nextShaderKey) with boolean capture flags (settingShaderBlockPrevKey, settingShaderBlockNextKey) for hotkey binding UI.
Input Handling & Hotkey Wiring
src/Menu.cpp
Replaced dev-mode-driven shader block iteration with conditional logic gated by EnableShaderBlocking. Added hotkey entries for ShaderBlockPrevKey/ShaderBlockNextKey in the hotkeyActions list; updated lambdas to reference new settings fields instead of old key references.
UI Controls & Settings Integration
src/Menu/AdvancedSettingsRenderer.cpp, src/Menu/SettingsTabRenderer.h
Added new "Shader Debug" section to Advanced Settings with checkbox for EnableShaderBlocking and hotkey display/change controls for Block Previous and Block Next. Updated Active Shaders tooltip and wired boolean state references through SettingsState.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Input handling logic changes: Review the hotkey registration and lambda capture flow in Menu.cpp to verify correct state mapping and removal of dev-mode dependency.
  • Settings serialization: Confirm the three new Settings fields are correctly integrated into the NLOHMANN macro and properly default/persist.
  • UI control state binding: Verify the new SettingsTabRenderer references correctly link to the Advanced Settings renderer controls and that hotkey capture flags are properly cleared after use.

Possibly related PRs

Suggested reviewers

  • alandtse
  • doodlum

Poem

🐰 A rabbit hops through shader blocks with glee,
No more hardcoded keys—now bindable and free!
With toggles and hotkeys, the config shines bright,
Settings reborn from the input-mapped light. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding configurable settings for shader block hotkeys through the UI, including enablement toggle and key rebinding options.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 Dec 3, 2025

Using provided base ref: 520945a
Using base ref: 520945a
Base commit date: 2025-12-03T01:43:28-08:00 (Wednesday, December 03, 2025 01:43 AM)
No actionable suggestions for changed features.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 3, 2025

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

@midona-rhel midona-rhel changed the title refactor(UI): add UI options for how the shader block hotkeys work refactor(ui): add UI options for how the shader block hotkeys work Dec 3, 2025
@davo0411 davo0411 changed the title refactor(ui): add UI options for how the shader block hotkeys work refactor(ui): add settings for shader block hotkeys Dec 4, 2025
Copy link
Copy Markdown
Collaborator

@davo0411 davo0411 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, happy if you have tested all hotkey code as working

@doodlum doodlum merged commit db72d81 into community-shaders:dev Dec 4, 2025
20 checks passed
davo0411 added a commit to davo0411/skyrim-community-shaders that referenced this pull request Dec 8, 2025
* build(deps): remove orphaned Intel XeSS dependency (community-shaders#1611)

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix(ui): enter key now behaves properly when first time popup is open (community-shaders#1615)

* feat(ui): add tabs to advanced settings & PBR search (community-shaders#1599)

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

* build: add HLSL intellisense (community-shaders#1614)

* refactor(UI): move light limit visualization into debug (community-shaders#1619)

* refactor(ui): add settings for shader block hotkeys (community-shaders#1624)

Co-authored-by: Bruce <44987693+brucenguyen@users.noreply.github.com>

* fix(ui): anchor reset settings button position  (community-shaders#1621)

Co-authored-by: Giovanni Correia <Gistix@users.noreply.github.com>

* fix(hair): use indirect normal for deferred marschner hair (community-shaders#1626)

* build: fix Package-AIO-Manual for fresh pulls (community-shaders#1625)

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

* fix(snow): use world space vectors (community-shaders#1618)

---------

Co-authored-by: Alan Tse <alandtse@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: soda <130315225+soda3000@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Giovanni Correia <Gistix@users.noreply.github.com>
Co-authored-by: Bruce <44987693+brucenguyen@users.noreply.github.com>
Co-authored-by: Midona <106106405+midona-rhel@users.noreply.github.com>
Co-authored-by: jiayev <l936249247@hotmail.com>
Pentalimbed pushed a commit to Pentalimbed/skyrim-community-shaders that referenced this pull request Dec 16, 2025
* chore(ui): update discord banner (community-shaders#1493)

* fix: use proper filename settingsuser.json (community-shaders#1491)

* chore(upscaling): increase fsr sharpness

* chore: rename d3d12interop to d3d12SwapChainActive (community-shaders#1494)

* feat(llf): remove particle lights (community-shaders#1495)

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

* feat(llf): move llf to core (community-shaders#1496)

* fix: remove water clamp (community-shaders#1497)

* fix(upscaling): more upscaling fixes (community-shaders#1498)

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

* fix: fix some internal errors when debugging (community-shaders#1500)

* fix(ui): fix save settings conflicts & welcome screen (community-shaders#1501)

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

* fix(ui): add constraints for discord banner size (community-shaders#1463)

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

* fix(VR): fix exiting menu using controllers (community-shaders#1502)

* build: fix warnings (community-shaders#1505)

* feat(UI): allow tooltips for disabled elements (community-shaders#1503)

* feat(upscaling): add downscale percentages (community-shaders#1506)

* perf(ssgi): optimize  (community-shaders#1499)

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

* feat(ui): font size and perf overlay improvements (community-shaders#1511)

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

* chore: remove unused hooks (community-shaders#1510)

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

* fix: adjust IsInterior to consider kNoSky or kFixedDimensions flags (community-shaders#1512)

* fix(hair): correct hair indirect normal, marschner by default (community-shaders#1515)

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

* chore: mostly revert ISHDR to 1.3.6 (community-shaders#1516)

* chore(upscaling): simplify interop and upscale methods (community-shaders#1514)

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

* fix(hair): typo in code (community-shaders#1517)

* feat(ibl): lerp sky ibl using skylighting (community-shaders#1519)

* fix(sss): burley artifacts with effect blend (community-shaders#1518)

* fix(upscaling): fix screenshots when upscaling enabled (community-shaders#1520)

* fix(upscaling): fix mipbias sometimes being wrong (community-shaders#1521)

* fix: fix compile error if snow shader on (community-shaders#1522)

* chore(upscaling): revert fsr to typical settings (community-shaders#1523)

* fix: fix minor ui issues (community-shaders#1524)

* chore(grass collision): simpler grass collision (community-shaders#1525)

* fix: update skylighting and version

* fix(pbr): fix inconsistencies (community-shaders#1526)

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

* feat(upscaling): sharpening slider (community-shaders#1527)

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

* chore: bump versions

* fix(ibl): add ibl to reflection normalization (community-shaders#1528)

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

* fix(hair): remove pbr lighting mult for hair (community-shaders#1531)

* chore(upscaling): add back upscale multiplier (community-shaders#1532)

* fix(upscaling): fix minor upscaling issues (community-shaders#1536)

* chore: gamma space normalisation (community-shaders#1535)

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

* feat(grass collision): implement with texture and history (community-shaders#1539)

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

* chore(grass collision): less aggressive (community-shaders#1546)

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

* fix(skylighting): fix cell id casting (community-shaders#1544)

* chore(emat): auto detect terrain parallax (community-shaders#1545)

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

* chore: update versions

* feat(VR): enable upscaling (community-shaders#1507)

* fix(terrain shadows): fix brightened lods (community-shaders#1547)

* chore(upscaling): reduce ghosting near camera (community-shaders#1548)

* fix: fix grass not animating (community-shaders#1549)

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

* fix(grass collision): fix non-standard timescales (community-shaders#1550)

* build: deploy only updated files (community-shaders#1556)

* feat: add Clear Shader Cache to Advanced (community-shaders#1555)

* chore(featureissues): default collapse testing menu (community-shaders#1554)

* fix(VR): use only supported shaders from cache (community-shaders#1553)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* build: use gersemi cmake formatter (community-shaders#1557)

* fix(terrain): vanilla diffuse in pbr terrain cell too bright due to wrong color space (community-shaders#1558)

* docs: add new feature development template guide (community-shaders#1529)

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

* docs(UI): remove duplicate GPL license statement (community-shaders#1561)

* feat: add renderdoc for debugging (community-shaders#1560)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alandtse <7086117+alandtse@users.noreply.github.com>
Co-authored-by: Alan Tse <alandtse@gmail.com>

* fix(ui): welcome popup size issues (community-shaders#1573)

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

* chore(grass collision): minor tweaks (community-shaders#1568)

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

* fix(terrain helper): fix conflicting bit (community-shaders#1566)

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

* feat(UI): separate theme settings, UI refactor, font support (community-shaders#1571)

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

* chore: bump versions

* build: fix zipping aio (community-shaders#1579)

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

* fix(grass collision): clamp maximum depth of grass (community-shaders#1578)

* feat(UI): enhance shader blocking (community-shaders#1564)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alandtse <7086117+alandtse@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alan Tse <alandtse@gmail.com>

* fix: remove duplicate buffer setup (community-shaders#1586)

* feat: update shader compile elapsed time every second (community-shaders#1587)

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

* build: add cmake install commands (community-shaders#1372)

* feat(perf-overlay): add size controls (community-shaders#1591)

* fix(perf-overlay): fix infinite draw calls table height (community-shaders#1590)

* refactor(perf-overlay): remove collapsible headers (community-shaders#1572)

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

* fix(perf-overlay): removed ImGuiTableFlags_ScrollX/Y for scroll bar issues (community-shaders#1594)

* build: fix shader copying to relative paths (community-shaders#1603)

* fix(ibl): apply ibl to cubemap normalisation for non deferred (community-shaders#1604)

* fix(grass): use correct light direction (community-shaders#1602)

* fix(welcome-popup): adjust font size & window spacing (community-shaders#1592)

* feat(lod): add gamma sliders (community-shaders#1588)

* build: correct CodeRabbit schema syntax (community-shaders#1608)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alandtse <7086117+alandtse@users.noreply.github.com>

* build: add compile-time validation of GPU buffers (community-shaders#1427)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alandtse <7086117+alandtse@users.noreply.github.com>

* ci: run shader validation on CMake and CI config changes (community-shaders#1606)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alandtse <7086117+alandtse@users.noreply.github.com>

* feat: procedural sun

* limb darkening

* another darkening

* build(deps): remove orphaned Intel XeSS dependency (community-shaders#1611)

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

* fix: accumulate sunlight color in pixel shader output

* fix(ui): enter key now behaves properly when first time popup is open (community-shaders#1615)

* feat(ui): add tabs to advanced settings & PBR search (community-shaders#1599)

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

* build: add HLSL intellisense (community-shaders#1614)

* refactor(UI): move light limit visualization into debug (community-shaders#1619)

* refactor(ui): add settings for shader block hotkeys (community-shaders#1624)

Co-authored-by: Bruce <44987693+brucenguyen@users.noreply.github.com>

* fix(ui): anchor reset settings button position  (community-shaders#1621)

Co-authored-by: Giovanni Correia <Gistix@users.noreply.github.com>

* fix(hair): use indirect normal for deferred marschner hair (community-shaders#1626)

* build: fix Package-AIO-Manual for fresh pulls (community-shaders#1625)

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

* fix(snow): use world space vectors (community-shaders#1618)

* feat(UI): add gaussian blur shader core files (community-shaders#1595)

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

* feat(ui): add test conditions button (community-shaders#1637)

* fix(ui): blocked shader info overflow in Shader Debug tab (community-shaders#1632)

* fix(upscaling): replace NIS with RCAS for DLSS (community-shaders#1620)

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

* fix(dynamic cubemaps): add a check for timeskip (community-shaders#1639)

* refactor: restructure lighting (community-shaders#1633)

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

* feat(ui): add themes & fonts (community-shaders#1596)

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

* feat(water): add flowmap parallax (community-shaders#1636)

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

* fix cloud shadow setting saving

---------

Co-authored-by: zxcvbn <66063766+zndxcvbn@users.noreply.github.com>
Co-authored-by: davo0411 <davidkehoe0411@outlook.com>
Co-authored-by: doodlum <15017472+doodlum@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Alan Tse <alandtse@users.noreply.github.com>
Co-authored-by: soda <130315225+soda3000@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: ThePagi <32794457+ThePagi@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alandtse <7086117+alandtse@users.noreply.github.com>
Co-authored-by: Alan Tse <alandtse@gmail.com>
Co-authored-by: Yupeng Zhang <ArcEarth@outlook.com>
Co-authored-by: kuplion <kuplion@hotmail.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: Giovanni Correia <Gistix@users.noreply.github.com>
Co-authored-by: Bruce <44987693+brucenguyen@users.noreply.github.com>
Co-authored-by: Midona <106106405+midona-rhel@users.noreply.github.com>
@midona-rhel midona-rhel deleted the fix/shader-block-buttons branch December 20, 2025 17:33
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.

block shaders if using pgup/pgdn as menu button

4 participants