Added shadowmask and shadowmask distance support#1594
Conversation
* shadowmask support * CHANGELOG.MD file * add images * Fix additional light shadowmask * Updated CHANGELOG.md * Shadowmask supports Vertex-Lighting Co-authored-by: Sharlene Tan <43795986+sharlenet@users.noreply.github.com>
…ighting. Also none of the pipelines do it any ways
… into universal/shadow-smooth-fade
… into universal/shadow-smooth-fade
… into universal/shadow-smooth-fade
…ghtShadow from MixRealtimeAndBakedGI (Now only used by subtractive lighting), this way having realtime and baked shadow calculation in one place with fade. Adding new overloads of GetMainLight and GetAdditionalLight that will contain realtime and baked shadow logic.
w1shmast3r
left a comment
There was a problem hiding this comment.
QA pass has revealed the following issue: No baked shadowmask is rendered after switching the shadowmask mode to Distance shadowmask, rebaking and setting shadow distance to 0.
For more details regarding the repro (project, steps, repro video, and images) please refer to the following link.
This bug needs to be fixed prior to merging this PR.
Fixed in latest commit |
|
Added @Unity-Technologies/mobile-qa for test pass on mobiles and Linux. More information regarding platform testing could be found here: https://docs.google.com/spreadsheets/d/1OAmFn25Y4OyhQqGeZF-ZSPQPzhfWK_ZXw9-6MmgwtU8/edit#gid=868713657 |
|
Automated test 049_Lighting_Mixed_Subtractive seems to fail right out of the gate when run manually on this branch... any idea why? |
ghost
left a comment
There was a problem hiding this comment.
Switched the PBR materials in the automated tests to shadergraph materials and ensured that the results were still identical visually after baking.
…o use old keywords for now to avoid breaking it
|
What's status on this PR? |
|
finishing manual shadowmask testing today |
There was a problem hiding this comment.
Still waiting for the clarification for this recently found bug: https://confluence.unity3d.com/display/teamgi/%5BURP%5D+-+Shadowmask+Support#id-[URP]-ShadowmaskSupport-bug7 other than that the Lighting QA test pass is done.
There was a problem hiding this comment.
Lighting QA test pass has been completed on Windows and macOS (both using Editor and Standalone Player.
Link to the feature test doc: https://confluence.unity3d.com/display/teamgi/%5BURP%5D+-+Shadowmask+Support
Tested with using Unity Version 2020.2.0b3 (ef376aff2859)
Branch: trunk
Tested on the following projects:
- URP Sample scene
- CornellBox URP;
- Sponza URP.
Testing included:
- Checking that the shadowmask gets generated for all aforementioned projects;
- Testing both Shadowmask and Distance Shadowmask modes and ensuring that the behaviour is consistent with the built-in RP;
- Testing some complicated scenarios with baked shadowmask (overlapping lights, toggling shadow distance, switching between lighting modes at runtime, etc)
- Integration with different lightmap backends (CPU/GPU PLM, Enlighten), different shaders and geometry (terrains).
Test outcomes:
- Several UI and functional bugs found, addressed and verified;
- 1 known UI issue: No Light Overlap mode scene view visualization filter in URP. Discussed that with Lukas and decided that due to the complexity of the potential fix, we need to fix this bug separately.
- Several unrelated issues related to URP integration with certain shaders and mixed lighting modes found. All of them have been logged to FogBugz;
- No other new regressions or ship-stoppers introduced by this PR have been found.
Approving as or revision 3f7f2fc. Great job!
vaidasma
left a comment
There was a problem hiding this comment.
Feature looks good on Android and iOS, no artifacts or unexpected behaviours detected. Testing document: https://docs.google.com/document/d/1pshQpUoKHpe7bMmiWVCYzPrUGt44o6whiFMycNDWHIY/edit?usp=sharing
Additional project were not covered in order not to bottleneck the feature time-wise. If additional coverage needed, please contact me.
|
Cancelled yamato. Previous commit was green and new one just fixed a conflict in editor build settings. |
Checklist for PR maker
need-backport-*label. After you backport the PR, the label changes tobackported-*.CHANGELOG.mdfile.Purpose of this PR
For more information please check the card https://jira.unity3d.com/browse/URP-36!
Testing status
Manual Tests: What did you do?
Comparing URP and Builtin mixed lighting. Simple scene with static walls, dynamic cube and lightprobes group.:
Builtin Mixed Lighting Subtractive + Probes
URP Mixed Lighting Subtractive + Probes
Builtin Mixed Lighting ShadowMask + Probes
URP Mixed Lighting ShadowMask + Probes
Builtin Mixed Lighting ShadowMask + Distance + Probes
URP Mixed Lighting ShadowMask + Probes (Has harder cut-off, but it is not part of shadowmask change. However it is something we should look into.)
Automated Tests:

049_Lighting_Mixed_Subtractive
043_Lighting_Mixed_ShadowMask

134_Lighting_Mixed_ShadowMask_Distance

Yamato:
https://yamato.prd.cds.internal.unity3d.com/jobs/902-Graphics/tree/universal%252Fshadow-mask-support
Any test projects to go with this to help reviewers?
For QA