Skip to content

Conversation

FrancescoC-unity
Copy link
Contributor

@FrancescoC-unity FrancescoC-unity commented Feb 4, 2021

This PR introduces a couple of things:

New public API

  • A new WouldFitInAtlas that takes directly a light.
  • A LightHasBeenPlacedInAtlas to verify if a light has found its placement in the cached shadow atlas.

Fixes

  • Would fit in atlas would previously would wrongly return true even if only one face of a point light shadow fit in the atlas.

EDIT:

Added even more API:

  • LightHasBeenPlaceAndRenderedAtLeastOnce needed as light OnDemand don't render automatically upon placement so they might contain stale data and the user might want to know about it.

@FrancescoC-unity FrancescoC-unity changed the title Add new API to CachedShadowManager and fix WouldFitInAtlas Add new API to CachedShadowManager and fix WouldFitInAtlas [DO NOT MERGE] Feb 4, 2021
@FrancescoC-unity FrancescoC-unity changed the title Add new API to CachedShadowManager and fix WouldFitInAtlas [DO NOT MERGE] Add new API to CachedShadowManager and fix WouldFitInAtlas Feb 4, 2021
@FrancescoC-unity
Copy link
Contributor Author

Note: there might be a slight issue with the new API, please don't merge I'll have to do a small pass on Monday.

@sebastienlagarde
Copy link
Contributor

@FrancescoC-unity guess we should update the documentation about sahdow caching as well to talk about this new feature

@FrancescoC-unity
Copy link
Contributor Author

FrancescoC-unity commented Feb 8, 2021

Yes, will add the docs when I do a small pass on it (likely Wednesday as it coincide with a relevant meeting I will have)

@sebastienlagarde sebastienlagarde marked this pull request as ready for review February 12, 2021 20:19
@sebastienlagarde sebastienlagarde removed the request for review from a team February 22, 2021 18:15
@sebastienlagarde
Copy link
Contributor

I have remove the QA on this PR as it is not something we can easily test. It was tested by Bornfire for validation instead.

@sebastienlagarde sebastienlagarde merged commit e7bc79e into master Feb 22, 2021
@sebastienlagarde sebastienlagarde deleted the HDRP/fix-and-add-would-fit branch February 22, 2021 18:17
sebastienlagarde added a commit that referenced this pull request Mar 3, 2021
* Fix a flickering issue related to moving shadow receivers (case 1302392) and a refactoring to avoid computing the same value for every effect. #3039

* The RTAO's history is now discarded if the occlusion caster was moving (case 1303418). #3343

* Update CHANGELOG.md

* Add new API to CachedShadowManager and fix WouldFitInAtlas #3387

* Added master stack documentation for HDRP (#3388)

* Added landing page and context/blocks overview page

* Added vertex context page and snippets

* Added the fragment context page and supporting snippets

* Added the decal master stack and the contexts intro

* Updated toc

* Added vertex context doc

* Update TableOfContents.md

* Added unlit doc

* Added lit master stack doc

* Added eye master stack doc

* Added fabric master stack

* added hair master stack

* Added stacklit master stack

* Added snippets to support shader stack work

* Fixed some formatting bugs

* Removed old links

* Updated links

* formatting

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

* Fix Sub-shadow rendering with cached shadows + Fix PCSS filtering issues on first frame or cached shadows #3396

* Reset ambient probe upon switching to very different skies bis #3423

* HDRP Graphic Test Fixes for Metal (#3408)

* Fixed the metal pipeline creation error message and updated several gfx test images.

* Rearranged LightData definition to workaround area lights not rendering issue on Intel GPUs on Catalina

* Updated 2501 reference image for Metal with the area light fix

* Updated 1550 and 2010 on Metal as previous were incorrect due to area light issue

Co-authored-by: Jeannette Yu <jeannette.yu@unity3d.com>

* Custom Pass error message fix (#3424)

Typo in DrawRenderersCustomPass error message. Fixed a few other typos in this section too :D

* Add Unity version to what's new 11 (#3432)

* Update whats-new-11.md

* Updated the table of contents

* Shader abstraction cleanup #3443

* Some leftover caused by master merge (#3456)

* Fix multiple any hit occuring on transparent objects (case 1294927). #3471

* Colored Shadows update (#3486)

* Colored Shadows update

Included new information in the Color Shadow property description to tell the user that the Material's  Refraction Model has to be set to Thin, Box or Sphere for it to work.

* Fixed typo

Removed the "the" :D

* Revert "Fix multiple any hit occuring on transparent objects (case 1294927). #3471"

This reverts commit 0587177.

* Update 1219_Lit_Light_on_Tesselation.png

Co-authored-by: anisunity <42026998+anisunity@users.noreply.github.com>
Co-authored-by: FrancescoC-unity <43168857+FrancescoC-unity@users.noreply.github.com>
Co-authored-by: Lewis Jordan <lewis.jordan@hotmail.co.uk>
Co-authored-by: Lewis Jordan <lewisjordan@unity3d.com>
Co-authored-by: Brandon Fogerty <34072588+brandon-unity3d@users.noreply.github.com>
Co-authored-by: Jeannette Yu <jeannette.yu@unity3d.com>
Co-authored-by: Vic Cooper <63712500+Vic-Cooper@users.noreply.github.com>
Co-authored-by: robinb-u3d <robinb-u3d@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.

2 participants