fix(water): fix water blending by setting buffers to RGBA16#2386
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR refactors water history blending in the shader to use a ChangesWater History Float4 Refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 OpenGrep (1.21.0)OpenGrep fatal error (exit code 2): [00.16][ERROR]: Error: exception Unix_error: No such file or directory stat src/Deferred.cpp 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 |
|
No actionable suggestions for changed features. |
|
fixes #2387 |
|
✅ A pre-release build is available for this PR: |
This pull request updates the water blending shader and its associated render targets to improve how water coverage and history are handled, ensuring more accurate blending and support for higher-precision data. The main changes include switching to four-component (
float4) formats for water history, updating the logic for water coverage calculation, and adjusting render target formats for better precision.Shader and Data Format Updates:
Color1inPS_OUTPUTfromfloat3tofloat4to store an additional water coverage value. (package/Shaders/ISWaterBlend.hlsl)waterHistoryTexfromTexture2D<float3>toTexture2D<float4>to store and access the water coverage (alpha channel) in addition to color. (package/Shaders/ISWaterBlend.hlsl)DXGI_FORMAT_R11G11B10_FLOATtoDXGI_FORMAT_R16G16B16A16_FLOATfor higher precision and to support four channels. (src/Deferred.cpp)Water Coverage and Blending Logic:
GetWaterCoveragefunction, and updated the threshold constant name for clarity. (package/Shaders/ISWaterBlend.hlsl)waterHistory.w) and output it in the alpha channel ofColor1. (package/Shaders/ISWaterBlend.hlsl) [1] [2]Summary by CodeRabbit