fix(wetness): fix water roughness and normal#1717
Conversation
|
✅ A pre-release build is available for this PR: |
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
📝 WalkthroughWalkthroughThis PR modifies the wetness shading calculations in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 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)
Files:
**/*⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (3)📓 Common learnings📚 Learning: 2025-08-03T18:37:19.690ZApplied to files:
📚 Learning: 2025-08-17T18:37:35.839ZApplied to files:
⏰ 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). (4)
🔇 Additional comments (3)
✏️ Tip: You can disable this entire section by setting 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. Comment |
This pull request updates the wetness effects calculations in the
Lighting.hlslshader to usevertexNormalinstead ofworldNormalfor several key computations. The changes improve the accuracy of wetness rendering by ensuring the correct normal is used for wetness-related factors, and by refining how wetness influences material roughness and normal blending.Wetness effects improvements:
wetnessNormalto usevertexNormal.xyzinstead ofworldNormal, ensuring wetness calculations are based on the actual vertex normal.minWetnessAngleto usevertexNormal.zfor more precise wetness angle determination.WetnessEffects::GetRainDropsto usewetnessNormalinstead ofworldNormal, improving raindrop placement accuracy.wetnessNormalwithworldNormalbased on puddle intensity, making the final normal more representative of wet surface conditions.Material property adjustments:
material.Roughnessto usewetnessGlossinessSpecularinstead ofwetnessReflectance.x, providing a more consistent response to wetness glossiness in the material properties.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.