Skip to content

Commit 68e3da1

Browse files
author
Antoine Lelievre
authored
[HDRP] Added a bit about scaling issues when dealing with history buffers (#4333)
* Updated troubleshooting custom pass doc * Update Custom-Pass-Troubleshooting.md
1 parent 8377c68 commit 68e3da1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

com.unity.render-pipelines.high-definition/Documentation~/Custom-Pass-Troubleshooting.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ To fix the causes in these cases:
1616
- Use `CoreUtils.SetRenderTarget` instead of `CommandBuffer.SetRenderTarget`.
1717
- Use `_RTHandleScale.xy` in your shader code when sampling an `RTHandle` buffer.
1818

19+
## History buffer scaling issues
20+
21+
Scaling issues can happen when you write a custom pass that uses or modifies a history buffer. This is because history buffers use different scale properties from RTHandles (_RTHandleScale.xy). To avoid scaling issues, use _RTHandleScaleHistory.xy to sample a history buffer.
22+
23+
If you bind another buffer instead of a history buffer, make sure you allocate the buffer using the correct render texture size. The render texture size can be different for every camera. To get the correct size of the render texture to use for a history buffer, use HDCamera.historyRTHandleProperties.currentRenderTargetSize.
24+
25+
1926
## Opaque objects disappear in build
2027

2128
If GameObjects with an opaque material in your scene disappear when you build your program, you might need to reconfigure your HDRP Asset settings.

0 commit comments

Comments
 (0)