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

Is the DLSS Super Resolution output incorrect when the velocity texture scale is [-1, 1]? #47

Closed
BobAndBooBoo opened this issue Oct 1, 2024 · 2 comments
Labels
question Further information is requested

Comments

@BobAndBooBoo
Copy link

BobAndBooBoo commented Oct 1, 2024

Version and Platform:

  • streamline v2.4.10
  • GPU: RTX4070Ti Super
  • Driver: 560.94

When the velocity texture scale passed to SLWrapper::Get().TagResources_General() is [-1, 1], it seems that the image becomes blurry during camera movement if sl::Constants is set as follows:

slConstants.cameraMotionIncluded = sl::Boolean::eTrue;
slConstants.mvecScale = {1.0f, 1.0f };

When I pass the velocity texture converted from [-1, 1] to pixel space to TagResources_General() and set the following:

slConstants.cameraMotionIncluded = sl::Boolean::eTrue;
slConstants.mvecScale = {1.0f / renderSize.x, 1.0f / renderSize.y};

it works correctly.

You should be able to verify this in the StreamlineSample using the following steps, but it will crash unless the issue previously reported is resolved...

  1. Modify StreamlineSample.cpp in StreamlineSample. Set slConstants.cameraMotionIncluded = sl::Boolean::eFalse and slConstants.mvecScale = { 1.0f, 1.0f }.
  2. Modify mvec.hlsl in Streamline to convert from pixel space to a scale of [-1, 1].
  3. Modify dlssEntry.cpp in Streamline so that mvecPixelSpace = false.
@jake-nv jake-nv added the question Further information is requested label Oct 1, 2024
@jake-nv
Copy link
Collaborator

jake-nv commented Oct 1, 2024

DLSS-SR is expecting mvecs in screen space as described in the DLSS Programming Guide section 3.6.1. If your mvecs are in another format (not supported directly by SL), we recommend doing the conversion in your engine and have SL pass the buffer through untouched (rather than changing SL to support your desired conversion).

@BobAndBooBoo
Copy link
Author

Upon checking, it seems that the mvecScale settings were incorrect. After setting slConstants.mvecScale = { -1.0f, -1.0f }, the issue no longer occurs when moving the camera, so I will close this issue. Thank you for your confirmation.

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

2 participants