Skip to content

Disable raytraced shadows when in full shadowmask #6506

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

Conversation

FrancescoC-unity
Copy link
Contributor

@FrancescoC-unity FrancescoC-unity commented Dec 7, 2021

Fix for https://fogbugz.unity3d.com/f/cases/1382831/

The solution we went for is just disable raytraced shadows when fully shadowmask. This because the other way round requires bigger changes that we can look into if it becomes a problem later on.

Now raytraced shadows are off when full shadow mask is used, to match this I also added a disable in the UX.

Updated a bit the docs.

What was tested: scene similar to repro description. Static object shadowmask and raytraced enabled. Before double shadows, now no double shadows

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>
@github-actions
Copy link

github-actions bot commented Dec 7, 2021

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

github-actions bot commented Dec 7, 2021

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!

@FrancescoC-unity FrancescoC-unity requested a review from a team December 7, 2021 12:27
@iM0ve
Copy link
Contributor

iM0ve commented Dec 7, 2021

Please describe whats tested, or what we could look into

@FrancescoC-unity
Copy link
Contributor Author

Please describe whats tested, or what we could look into

Done :-)

Copy link
Contributor

@anisunity anisunity left a comment

Choose a reason for hiding this comment

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

lgtm

@sebastienlagarde sebastienlagarde changed the base branch from hd/bugfix to master December 9, 2021 18:50
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.

There's something funky happening with the UI;
Before, you can't enable the ray traced shadow without screen space shadow,
https://user-images.githubusercontent.com/57442369/145860337-5bbbfa72-f150-45eb-8917-71ba17d469c8.mp4

After, you can (even though it has no effect because raytraced shadow is disabled because of shadowmask)

4f5bcaeb80e3f6950ce3f1106cc45bfb.mp4

Also, after baking with the fix, you can't have raytraced shadow anymore (which is the point), but when going back to real time and clearing the shadowmaps, you can't have raytraced shadows anymore for some reasons :|

902b1efcecf6b62fe68e932af7d49acc.mp4

@FrancescoC-unity
Copy link
Contributor Author

The UX one is easy to fix and already did, the other is turning out to be much more complex and this is mostly due to the fact that changes of "baking mode" don't trigger a change in the UI and the UI for them is controlled C++ side.

With the new burst lightloop, there is no update of properties unless a change in UI happens, so we are a bit in a weird spot.

Trying to find solutions.

@FrancescoC-unity
Copy link
Contributor Author

@remi-chapelain should be good now?

@remi-chapelain remi-chapelain self-requested a review December 16, 2021 16:58
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.

All good now ! ✔️
Tested multiple types of lights combined. When in mixed and shadow mask rt is grey out and even if it was checked, it's not visible now.

After removing shadowmask or mixed lighting on the light, we get the raytraced shadow back ✔️

@sebastienlagarde
Copy link
Contributor

test are failing: error: UnhandledLogMessageException: Unhandled log message: '[Error] C:\build\output\Unity-Technologies\Graphics\com.unity.render-pipelines.high-definition\Runtime\Lighting\Light\HDAdditionalLightData.cs(3632,29): error CS1061: 'Light' does not contain a definition for 'lightmapBakeType' and no accessible extension method 'lightmapBakeType' accepting a first argument of type 'Light' could be found (are you missing a using directive or an assembly reference?)'. Use UnityEngine.TestTools.LogAssert.Expect

@sebastienlagarde sebastienlagarde merged commit 0852695 into master Feb 3, 2022
@sebastienlagarde sebastienlagarde deleted the HDRP/disable-raytraced-shadows-when-shadowmask branch February 3, 2022 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.