Kino icon indicating copy to clipboard operation
Kino copied to clipboard

DLSS issues

Open joshkbaker opened this issue 2 years ago • 8 comments

Screen effects cause some DLSS issues with the screen being cropped when using these effects. You can reproduce this by adding the Nvidia DLSS package into your project, apply 'maximum quality' or 'maximum performance' settings on the DLSS and watch the screen crop.

joshkbaker avatar Dec 08 '22 13:12 joshkbaker

I think this is actually caused by the dynamic resolution feature, not specifically depending on DLSS.

keijiro avatar Dec 09 '22 02:12 keijiro

Was there ever a solution for this? Really needed to use dynamic resolution but I also really like your effects.

Thanks

joshkbaker avatar Jan 24 '23 12:01 joshkbaker

There is a section in the custom passes page on Unity called 'Dynamic resolution' support. It says this: "If you want to use DLSS and/or dynamic resolution on your pass, and you need to interpolate or sample UVs from color / normal or velocity, you must 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

I have no idea how you'd implement that to your post-processing

joshkbaker avatar Jan 27 '23 10:01 joshkbaker

still no solution to this issue ?

facybenbook avatar Mar 30 '23 02:03 facybenbook

You can actually make it work with DLSS. You need to adjust injection point like this: image

It works on 2022.2.16, HDRP 14.0.7.

Lemonify avatar Apr 23 '23 22:04 Lemonify

You can actually make it work with DLSS. You need to adjust injection point like this: image

It works on 2022.2.16, HDRP 14.0.7.

Confirming this fixes issues on Unity 2022.3.4f1, HDRP 14.0.8. Thanks!

aemiliu5 avatar Oct 27 '23 10:10 aemiliu5

the problem we are not allowed to use 2022 :/ we stuck with unity 2021

facybenbook avatar Oct 27 '23 14:10 facybenbook

I found a solution! At least for Unity 2021 and higher. Open the Glitch.hlsl file and replace _ScreenSize to _PostProcessScreenSize everywhere! That's all!

funnymanwin avatar Nov 04 '23 11:11 funnymanwin