Skip to content

[Fogbugz # 1377986] Fixing DLSS exception when motion vectors are disabled #6292

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

Merged
merged 3 commits into from
Nov 25, 2021

Conversation

kecho
Copy link
Contributor

@kecho kecho commented Nov 15, 2021

Purpose of this PR

DLSSPass fails because it casts incoming textures as RenderTexture. This will cause exception when for example we cast a dummy black texture (the missing velocity texture). Thus, just changing the accepting texture type to Texture will be a robust fix for this issue.
https://fogbugz.unity3d.com/f/cases/1380282


Testing status

Tested repro case in fogbugz

@github-actions
Copy link

Hi! This comment will help you figure out which jobs to run before merging your PR. The suggestions are dynamic based on what files you have changed.
Link to Yamato: https://unity-ci.cds.internal.unity3d.com/project/902/
Search for your PR branch using the search bar at the top, then add the following segment(s) to the end of the URL (you may need multiple tabs depending on how many packages you change)

HDRP
/jobDefinition/.yamato%2Fall-hdrp.yml%23PR_HDRP_trunk
With changes to HDRP packages, you should also run
/jobDefinition/.yamato%2Fall-lightmapping.yml%23PR_Lightmapping_trunk

Depending on the scope of your PR, you may need to run more jobs than what has been suggested. Please speak to your lead or a Graphics SDET (#devs-graphics-automation) if you are unsure.

@github-actions
Copy link

It appears that you made a non-draft PR!
Please convert your PR to draft (button on the right side of the page).
See the PR template for more information.
Thank you!

* Using texture types instead of RenderTexture types for DLSSPass

* Changelog

* Formatting
@kecho kecho force-pushed the HDRP/FixDLSSBadMotionVectors branch from 738eeb7 to 98a4e4e Compare November 15, 2021 19:48
@RemyUnity
Copy link
Contributor

Is there any side effect of this that you think might require testing ?

@remi-chapelain
Copy link
Contributor

I think you got the wrong fogbugz link.
I believe this is the one you are fixing.

Looking at the code, makes me think that now DLSS won't make the whole render fail but will just not be used silently ?
Maybe it would be better to have a warning somewhere that DLSS indeed need motion vectors to work properly ?
This could be shown when enabling DLSS when motion vectors is disabled, or when disabling motion vectors when DLSS is already activated in the HDRP asset.

Also, it may be common knowledge but there's no mention of motion vectors in the documentation either

Copy link
Contributor

@remi-chapelain remi-chapelain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking since I'm awaiting answers from previous comment !

@kecho kecho requested a review from remi-chapelain November 22, 2021 13:42
@kecho
Copy link
Contributor Author

kecho commented Nov 22, 2021

@remi-chapelain sorry, yes indeed wrong buglink. Updated! This fix should definitely fix this bug though. Let me know what you find out. Id say we just test having motion vectors off. DLSS can still be used as an anti aliasing effect without motion vectors.

Copy link
Contributor

@remi-chapelain remi-chapelain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. I agree on this ✔️

@sebastienlagarde sebastienlagarde merged commit 619a943 into master Nov 25, 2021
@sebastienlagarde sebastienlagarde deleted the HDRP/FixDLSSBadMotionVectors branch November 25, 2021 14:10
sebastienlagarde added a commit that referenced this pull request Dec 8, 2021
* Using texture types instead of RenderTexture types for DLSSPass

* Changelog

* Formatting

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
sebastienlagarde added a commit that referenced this pull request Dec 9, 2021
* - Fixed edges and ghosting appearing on shadow matte due to the shadow being black outside the range of the light (case 1371441). #6279

* Fixed interpolation issue with wind orientation (case 1379841). #6284

* Fixed range fields for depth of field #6285

* [Core] Fix XR support in CoreUtils.Drawfullscreen #6287

* ** Fixing DLSS failing when MV are disabled ** (#6292)

* Using texture types instead of RenderTexture types for DLSSPass

* Changelog

* Formatting

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* [Fix] Lens Flare visible when being behind a camera with Panini Projection on (case 1370214) (#6293)

* Fix panini for LensFlare

* Add changelog

* Update CHANGELOG.md

* Fixed the ray tracing acceleration structure build marker not being included in the ray tracing stats (case 1379383). #6277

* [HDRP] Remove alpha from local volumetric fog color field #6310

* [HDRP] Changed default numbder of physically based sky bounce from 8 to 3 #6304

* [HDRP] Improve decal performances when they use different material and the same draw order. #6303

* [HDRP] Update reference screenshots #6404

* Fixed Nans happening due to volumetric clouds when the pixel color is perfectly black (case 1379185). #6311

* Fixed missing information in the tooltip of affects smooth surfaces of the ray traced reflections denoiser (case 1376918). #6321

* Physically Based Sky documentation now mentions the warmup cost explicitly (#6323)

* Physically Based Sky documentation now mentions the warmup cost explicitly.

* Update CHANGELOG.md

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>

* Reviewed PR #6031 (#6340)

* Reviewed PR #6031

Also generally improved this doc, fixed typos and added screenshots.

* Apply formatting changes

Co-authored-by: noreply@unity3d.com <noreply@unity3d.com>

* Fix preview scene objects marked dirty by migration #6361

* [HDRP][Path Tracing] Fixed PS5 build compilation warnings #6362

* Fix compil issue

* Apply formatting changes

* Update VisualEnvironment.cs

* Fix HDRP warning (#6396)

* [HDRP][Metal]

* Update reference screenshots sky

Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com>
Co-authored-by: Adrien de Tocqueville <adrien.tocqueville@unity3d.com>
Co-authored-by: Antoine Lelievre <antoinel@unity3d.com>
Co-authored-by: Kleber Garcia <kleber.garcia@unity3d.com>
Co-authored-by: skhiat <55133890+skhiat@users.noreply.github.com>
Co-authored-by: JulienIgnace-Unity <julien@unity3d.com>
Co-authored-by: Vic Cooper <63712500+Vic-Cooper@users.noreply.github.com>
Co-authored-by: noreply@unity3d.com <noreply@unity3d.com>
Co-authored-by: Arttu Peltonen <77337829+arttu-peltonen@users.noreply.github.com>
Co-authored-by: Emmanuel Turquin <emmanuel@turquin.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants