-
Notifications
You must be signed in to change notification settings - Fork 839
[HDRP] Add custom pass buffer scaling functions #5809
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HDRP] Add custom pass buffer scaling functions #5809
Conversation
Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed. HDRP Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure. |
...pipelines.high-definition/Runtime/RenderPipeline/RenderPass/CustomPass/CustomPassCommon.hlsl
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a suggestion and a question.
@@ -463,6 +463,11 @@ You can also load custom buffers using the following functions: | |||
- `LoadCustomColor(uint2 pixelCoords)` | |||
- `LoadCustomDepth(uint2 pixelCoords)` | |||
|
|||
Note that depending on the injection point used for the Fullscreen custom pass, sampling the custom buffer can result in incorrect scaling. Thus it's recommended to use these functions instead: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which injection points cause incorrect scaling? I think it would be helpful to the user to be specific here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These injection points were causing scaling issues:
- BeforePreRefraction
- BeforePostProcess
- AfterPostProcess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked with Antoine there seems to be another scaling issue when Custom Pass is in After Post Process when CustomPassSampleCustomColor is used.
2021-10-14.17-18-30.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! No more scaling issues occur.
|
||
## [13.1.0] - 2021-09-24 | ||
|
||
### Added | ||
- Added a SG node to get the main directional light direction. | ||
- Added new functions that sample the custom buffer in custom passes (CustomPassSampleCustomColor and CustomPassLoadCustomColor) to handle the RTHandleScale automatically. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add it to what's new
* master: (148 commits) [HDRP] Add custom pass buffer scaling functions (#5809) Fix HDRP template input not working when using the new Input System and no Keyboard/Mouse (#6045) [SRP] Bump package version to 13.2.0 (#6049) ** Improving FTPL perf on ps4 by .3 ms on average ** (#5866) Remove min version from package.json (#6044) Fix subdiv view (#6033) Small qol (#6036) APV: update some tooltips and add a clamp on dilation validity threshold (#6005) SRP bump to 13.1.1 (#6041) (SRP] Bump min version to a12 to fix Yamato Vfx/fix/1289612 filter texture by dimension (#5715) [HDRP] Fix 9601/9602 reference screenshots after cache server weirdness [CI] [trunk] Updated editor to 5a5aca0fb632e01b9b362f6deb73bcf599d612ca [CI] [trunk] Updated editor to 7b5b9bb6eed88e40de00efa2a629dd8f0b2bfee2 [CI] [trunk] Updated editor to a397ac6302d3ce68bd3eeea7721610a649addfa3 [CI] [trunk] Updated editor to dd9d77b7ded66b5edad4dacf123ffbb6c8d8c4bf [CI] [trunk] Updated editor to 6c7822fe613adfea64bb232c817a2fdee34fc273 [CI] [trunk] Updated editor to aae7fd02ff5afebc831948d25c52dcf704a8a3f3 [CI] [trunk] Updated editor to 9c278756e419ae931cabac6c5dd60f24e05c6de3 [CI] [trunk] Updated editor to d3dc7fc8d330da1155ec00683876a559b2a63281 ...
Purpose of this PR
Added 2 new functions to sample the custom buffer in custom passes (CustomPassSampleCustomColor and CustomPassLoadCustomColor), they avoid having to handle the RTHandleScale manually.
Testing status
Manually tested that both functions handle correctly scaling in all injection points (with multiple cameras at different resolutions)
Test doc: https://docs.google.com/spreadsheets/d/15hgpyHVXLxckGdQRGziqAe-tV3p_cqAlQJYZGimqXxs/edit#gid=0
Before:
After:
https://yamato.cds.internal.unity3d.com/jobs/902-Graphics/tree/hd%252Ffix%252Fcustom-pass-buffer-scaling-functions/.yamato%252Fall-hdrp.yml%2523PR_HDRP_trunk/9007202/job