Skip to content

chore: "fix(pbr): metal low-light rendering fixed, improved cubemaps"#1410

Merged
doodlum merged 1 commit into
devfrom
revert-1404-dev-16-08-2025
Aug 17, 2025
Merged

chore: "fix(pbr): metal low-light rendering fixed, improved cubemaps"#1410
doodlum merged 1 commit into
devfrom
revert-1404-dev-16-08-2025

Conversation

@doodlum
Copy link
Copy Markdown
Collaborator

@doodlum doodlum commented Aug 17, 2025

Reverts #1404

Summary by CodeRabbit

  • Bug Fixes
    • Improved specular reflections and roughness response for more consistent, physically plausible highlights across materials.
    • Removed unintended ambient specular boost in deferred/non-PBR rendering, reducing over-bright or washed-out highlights.
  • Refactor
    • Streamlined specular evaluation logic (reflectance gating and view-direction handling) for more predictable lighting results and better alignment across rendering paths.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Aug 17, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Updates shader logic affecting specular reflections: DeferredCompositeCS.hlsl changes reflectance gating, view vector computation, and roughness-to-level mapping; Lighting.hlsl removes an ambient directional specular addition in the non-PBR path. No public interfaces changed.

Changes

Cohort / File(s) Summary of Changes
Specular gating, view vector, and roughness mapping
package/Shaders/DeferredCompositeCS.hlsl
Replaced luminance threshold with per-channel non-zero reflectance check; V now uses normalize(positionWS.xyz); simplified roughness mapping to roughness = 1 - glossiness and level = roughness * 7.0.
Deferred lighting ambient specular adjustment
package/Shaders/Lighting.hlsl
Removed addition of indirect directional ambient to specularColorPBR in non-PBR branch; retained diffuse vertexColor modulation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • jiayev

Poem

A bunny peers at specular light,
Tweaks V’s glance to catch it right.
Roughness slides—so smooth, so clean,
No ambient hitch in the deferred scene.
With whiskers twitching, code hops through—
Reflections truer, shaders new. 🐇✨


📜 Recent review details

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

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between bd57c65 and 6f656e6.

📒 Files selected for processing (2)
  • package/Shaders/DeferredCompositeCS.hlsl (1 hunks)
  • package/Shaders/Lighting.hlsl (0 hunks)
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch revert-1404-dev-16-08-2025

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@doodlum doodlum merged commit 8ea32bb into dev Aug 17, 2025
7 of 9 checks passed
@github-actions
Copy link
Copy Markdown

Using provided base ref: bd57c65
Using base ref: bd57c65
Base commit date: 2025-08-17T19:32:46+01:00 (Sunday, August 17, 2025 07:32 PM)
No actionable suggestions for changed features.

@github-actions
Copy link
Copy Markdown

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

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.

1 participant