Skip to content

chore: improved default sss settings#1446

Merged
doodlum merged 1 commit into
devfrom
sss-settings
Sep 8, 2025
Merged

chore: improved default sss settings#1446
doodlum merged 1 commit into
devfrom
sss-settings

Conversation

@doodlum
Copy link
Copy Markdown
Collaborator

@doodlum doodlum commented Sep 8, 2025

Summary by CodeRabbit

  • Refactor
    • Updated default subsurface scattering mode to improve out-of-the-box rendering quality.
    • Tuned the default human skin diffusion profile by reducing the blur radius, yielding crisper surface details while preserving overall softness.
    • These changes affect the default appearance of skin and similar materials; users may notice subtly sharper features and a revised subsurface look without adjusting settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 8, 2025

Walkthrough

Default values in SubsurfaceScattering::Settings were updated: SSMode now defaults to 1, and HumanProfile’s BlurRadius default changed from 1.0f to 0.5f. No other fields or files were modified.

Changes

Cohort / File(s) Summary of changes
Rendering settings defaults
src/Features/SubsurfaceScattering.h
Updated default for SSMode (0 → 1). Updated HumanProfile initializer: DiffusionProfile{ 1.0f, 1.0f, {...}, {...} }DiffusionProfile{ 0.5f, 1.0f, {...}, {...} }. No other structural changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit tweaks the light’s soft ring,
Half the blur, a gentler spring.
Mode one wakes the skins’ soft glow,
Under fur, the photons flow.
Thump-thump—defaults hop in line,
Scattering set, render fine. 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sss-settings

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 Sep 8, 2025

Using provided base ref: 3bed38c
Using base ref: 3bed38c
Base commit date: 2025-09-08T17:00:21+01:00 (Monday, September 08, 2025 05:00 PM)
No actionable suggestions for changed features.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/Features/SubsurfaceScattering.h (1)

23-23: Behavior change: SSMode default now 1 — verify load/reset paths and shader selection.

This alters out‑of‑box rendering. Please confirm:

  • LoadSettings uses this new default when SSMode is absent, and RestoreDefaultSettings reflects it.
  • DrawSettings/UI shows “1” as the initial mode and any clamping/range still valid.
  • Shader selection branches (e.g., blur vs. Burley compute) map “1” to the intended path.

Run to audit usages and reset/serialization:

#!/bin/bash
set -euo pipefail

echo "Occurrences of SSMode with context:"
rg -nP -C3 '\bSSMode\b'

echo -e "\nReset/serialization implementations:"
rg -nP -C2 '(RestoreDefaultSettings|LoadSettings|SaveSettings)\s*\('

echo -e "\nConditionals comparing SSMode to literals:"
rg -nP -C3 'SSMode\s*==\s*\d'

echo -e "\nPotential shader path selection sites:"
rg -nP -C3 '(DrawSSS|GetComputeShader(Burley|HorizontalBlur|VerticalBlur))'
📜 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 3bed38c and 530dbdd.

📒 Files selected for processing (1)
  • src/Features/SubsurfaceScattering.h (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{cpp,cxx,cc,c,h,hpp,hxx,hlsl,hlsli,fx,fxh,py}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Do not include TODO/FIXME placeholders; provide complete, working solutions

Files:

  • src/Features/SubsurfaceScattering.h
src/**/*.{cpp,cxx,cc,h,hpp,hxx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{cpp,cxx,cc,h,hpp,hxx}: Ensure SE/AE/VR runtime compatibility; use runtime detection patterns (e.g., REL::RelocateMember())
Include robust error handling and resource management with graceful degradation in the plugin code

Files:

  • src/Features/SubsurfaceScattering.h
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build plugin and addons
🔇 Additional comments (1)
src/Features/SubsurfaceScattering.h (1)

25-25: HumanProfile BlurRadius 1.0f → 0.5f — check kernel math and UI bounds.

Smaller radius tightens the SSS blur. Please verify:

  • Gaussian/Profile/CalculateKernel logic behaves well for 0.5f (no underflow/degenerate weights).
  • ImGui (or equivalent) slider min/step includes 0.5f so the default isn’t auto‑clamped.
  • Any VR tuning relying on a ≥1.0f radius isn’t implicitly weakened.

Audit references to BlurRadius and UI bounds:

#!/bin/bash
set -euo pipefail

echo "BlurRadius usage across codebase:"
rg -nP -C3 '\bBlurRadius\b|CalculateKernel\s*\(|Gaussian\s*\(|Profile\s*\('

echo -e "\nUI controls potentially constraining HumanProfile.BlurRadius:"
rg -nP -C3 '(HumanProfile|BlurRadius).*(SliderFloat|DragFloat|InputFloat|SameLine)'

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 8, 2025

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

@doodlum doodlum merged commit 2018b98 into dev Sep 8, 2025
17 checks passed
@alandtse alandtse deleted the sss-settings branch February 6, 2026 05:20
@coderabbitai coderabbitai Bot mentioned this pull request May 9, 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