Rasagar/Library/PackageCache/com.unity.render-pipelines.high-definition/Documentation~/custom-post-processing-dynamic-resolution-dlss.md

13 lines
580 B
Markdown
Raw Normal View History

2024-08-26 13:07:20 -07:00
# Use custom post-processing with dynamic resolution and DLSS
If you want to use DLSS or dynamic resolution with a custom post-processing pass, and need to interpolate or sample UVs from color, normal, or velocity, use the following functions to calculate the correct UVs:
```glsl
#include "Packages/com.unity.render-pipelines.high-dynamic/Runtime/ShaderLibrary/ShaderVariables.hlsl"
//...
float2 UVs = ... //the uvs coming from the interpolator
float2 correctUvs = ClampAndScaleUVForBilinearPostProcessTexture(UV); // use these uvs to sample color / normal and velocity
```