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

Bugfix 1359282: Emissive decal silhouette issue #5532

Merged
merged 146 commits into from
Sep 20, 2021

Conversation

JarkkoUnity
Copy link
Contributor

@JarkkoUnity JarkkoUnity commented Sep 6, 2021

Purpose of this PR

Emissive projected decals suffer from artifacts in object silhouettes because UV discontinuities and how GPU uses the UV screen derivatives to calculate texture LOD. Fogbugz: https://fogbugz.unity3d.com/f/cases/1359282/


Testing status

Added 1715 graphics test and got expected results on different platforms


Comments to reviewers

Calculates texture LOD manually and clamps to given max based on depth screen derivatives. This is not perfect solution but reduces the issue. This solution also requires GetDimensions() to be available (#ifdeffed in shader) and otherwise samples from LOD 0 (which suffers from projected emissive texture aliasing but at least doesn't have the artifact). Only platform that doesn't support GetDimensions() is Metal, which graphics test shows more texture aliasing artifacts on the floor. There also seems to be some issue with depth derivatives that required clamping the device depth to a small but larger-than-0 value in shader, which was showing artifacts in sphere silhouette against sky background. The graphics test camera is oriented so that shows the issue in the sphere silhouette if this depth clamp isn't present.

pmavridis and others added 30 commits May 26, 2021 19:23
* Fix AxF debug output in certain configurations.

* Update comment
* Fix white flash

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Show info box when ray tracing is enabled.

* Changelog

* Move below MSAA

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
…phics Compositor enabled (#4593)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Reconstruct jittered projection matrix far plane (for Infinite )

* Changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
…DRP's lifecycle. (#4688)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Fix overdraw in custom pass utils blur function

* Updated changelog

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

* changelog

* Force sync compilation for TAA

Co-authored-by: CifaCia <f.cifariellociardi@gmail.com>
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
…side is updated. (case 1335737, related to 1314040) (#4691)

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
…ing only the RTSSS Data (case 1332904). (#4626)

* Fixed the ray traced sub subsurface scattering debug mode not displaying only the RTSSS Data (case 1332904).

* Add test scene

Co-authored-by: Remi Chapelain <remi.chapelain@unity3d.com>
Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>
…e refraction and probe refraction (#4653)

* Delete the second transmittance mul

* Changelog

Co-authored-by: Sebastien Lagarde <sebastien@unity3d.com>
#4636)

* Initialize the shading normal to a non-zero value for anisotropy

* Changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Fix VfX lit particle aov output color space

* Update comment

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
* Fixed issue with transparent unlit.

* Updated changelog.

* Reverted accidental change to default mtl.

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

* changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
…cal volumetric fog volume (#4728)

* Fixed nullref when deleting the 3D mask of a density volume (case 1339330)

* Updated changelog

Co-authored-by: sebastienlagarde <sebastien@unity3d.com>
@JarkkoUnity JarkkoUnity marked this pull request as ready for review September 14, 2021 14:11
@JarkkoUnity JarkkoUnity requested a review from a team September 14, 2021 14:16
@sebastienlagarde
Copy link
Contributor

Yamato is good (error from master). Ready for test

Copy link
Contributor

@iM0ve iM0ve left a comment

Choose a reason for hiding this comment

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

I have verified the fix. It doesnt cure the issue 100% but its a lot better. See the results below(enlarge images):

Before the PR:

wBc7s3bZy9

After the PR:

yoVbUh7gdY

To completely get rid of the outline there are a few options:

  • Enable Always Refresh + Temporal anti-aliasing
  • Have geometry behind the object (not sky as background)
ormNNNseHY.mp4

@sebastienlagarde sebastienlagarde merged commit ef578a4 into master Sep 20, 2021
@sebastienlagarde sebastienlagarde deleted the hd/bugfix-1359282 branch September 20, 2021 15:23
sebastienlagarde added a commit that referenced this pull request Oct 16, 2021
* [HDRP] fix screenshots after cache server reset

* Bugfix 1359282: Emissive decal silhouette issue #5532

* Force scalarization of shadow index data off (#6007)

* [HDRP] Merge Hd/bugfix #5999

* Fix PBR Accumulation for 10.6 (#5991)

* Fix PBR Accumulation for 10.6

* Add ChangeLog

* Update CHANGELOG.md

* Fix shadow mask fade and optimize it at same time #5911

* Revert: Fixed tooltip not showing on labels in ShaderGraphs #5877

* Update CHANGELOG.md

* update reference screenhsots

Co-authored-by: Jarkko Lempiäinen <79095390+JarkkoUnity@users.noreply.github.com>
Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com>
Co-authored-by: skhiat <55133890+skhiat@users.noreply.github.com>
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.