Skip to content
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

DLSS issues #21

Open
joshkbaker opened this issue Dec 8, 2022 · 8 comments
Open

DLSS issues #21

joshkbaker opened this issue Dec 8, 2022 · 8 comments
Assignees
Labels
question Further information is requested

Comments

@joshkbaker
Copy link

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.

@keijiro keijiro self-assigned this Dec 9, 2022
@keijiro keijiro added the question Further information is requested label Dec 9, 2022
@keijiro
Copy link
Owner

keijiro commented Dec 9, 2022

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

@joshkbaker
Copy link
Author

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

Thanks

@joshkbaker
Copy link
Author

joshkbaker commented Jan 27, 2023

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

@facybenbook
Copy link

still no solution to this issue ?

@Lemonify
Copy link

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.

@aemiliu5
Copy link

aemiliu5 commented Oct 27, 2023

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!

@facybenbook
Copy link

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

@funnymanwin
Copy link

funnymanwin commented Nov 4, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants