Rasagar/Library/PackageCache/com.unity.render-pipelines.high-definition/Documentation~/custom-post-processing-dynamic-resolution-dlss.md
2024-08-26 23:07:20 +03:00

580 B

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:

#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