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

Improved shadow fade #3089

Merged
merged 34 commits into from
Feb 11, 2021
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
19a8055
Debug culling render feature
eh-unity Oct 19, 2020
615edb8
Very basic UI for toggling debug features.
eh-unity Oct 20, 2020
159958d
Add support for shadow cascade debug and spotlights.
eh-unity Oct 20, 2020
b16ce6b
Merge branch 'master' into universal/debug-cull-features
eh-unity Oct 20, 2020
a7f9504
Added main camera culling debug viewer.
eh-unity Oct 20, 2020
ca3041c
Merge branch 'master' into universal/debug-cull-features
eh-unity Nov 10, 2020
f784053
Fix indexing bug when no direct lights.
eh-unity Nov 10, 2020
61b7bbe
Merge branch 'master' into universal/debug-cull-features
eh-unity Nov 20, 2020
ba8be04
Refactor
eh-unity Nov 20, 2020
4f71081
Changing urp shadow fade on main light to use last shadow cascade. Ch…
lukaschod Jan 13, 2021
118cd90
Merge branch 'master' into universal/shadow-fade-improvements
lukaschod Jan 13, 2021
94427ff
Updating up and down snatch with new high quality texture. Adding hov…
lukaschod Jan 14, 2021
3ea23a3
Reducing snatch height by 1px as it was incorrect. Increasing cascade…
lukaschod Jan 14, 2021
f3bda3b
Removing old cascade code from urp and hdrp. As all the methods are i…
lukaschod Jan 14, 2021
9753704
Reformatting Shadows.hlsl
lukaschod Jan 14, 2021
7fdb6ea
Adding main light and additional light. Changed main light shadow fad…
lukaschod Jan 15, 2021
0ef7685
Moving shadow cascade class into shadow folder and updating the chang…
lukaschod Jan 15, 2021
220a587
Adding changelog entries about shadow fade imporvement in urp and hdrp
lukaschod Jan 15, 2021
d75f295
Updating urp changelog with GetShadowFade deprecated
lukaschod Jan 15, 2021
e290e02
Removing lastShadowCascade from _CascadeShadowSplitSphereLast as it i…
lukaschod Jan 18, 2021
ce8a5a7
Fixing metric slider issue and small clean
lukaschod Jan 21, 2021
e91f967
Merge commit 'c8d18abfed6c93dcc7a914756354fed7908e7f52' into universa…
lukaschod Jan 21, 2021
eded9b1
Updating resource paths
lukaschod Jan 21, 2021
f579e11
Update com.unity.render-pipelines.universal/CHANGELOG.md
lukaschod Jan 21, 2021
10ff161
Fixing last border not working with metric. Increasing validation ran…
lukaschod Jan 22, 2021
ae48ec6
Fixing shadow cascade gui to work correctly with 0 metric base
lukaschod Jan 22, 2021
368b214
Reverting main camera shadow fade from last cascade capsulate to came…
lukaschod Jan 26, 2021
9f71e4a
Adding urp asset version 8. That sets shadow fade to 0.1, which was h…
lukaschod Jan 26, 2021
6b7836f
Merge branch 'universal/shadow-fade-improvements' of github.com:Unity…
lukaschod Jan 26, 2021
7a0f6f0
Changing shadow fade logic when fade is near zero to account for fadi…
lukaschod Feb 1, 2021
75cb934
Adding wait frames for test 134 as script modifies one of the settings
lukaschod Feb 8, 2021
210162e
Merge branch 'master' of github.com:Unity-Technologies/Graphics into …
lukaschod Feb 8, 2021
0c58876
Updating 134 test for iphone
lukaschod Feb 9, 2021
f952e7a
Merge branch 'master' of github.com:Unity-Technologies/Graphics into …
lukaschod Feb 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changing shadow fade logic when fade is near zero to account for fadi…
…ng in fraction
  • Loading branch information
lukaschod committed Feb 1, 2021
commit 7a0f6f0620d172d0151a166c7a6b4db107a0cfe1
7 changes: 4 additions & 3 deletions com.unity.render-pipelines.universal/Runtime/ShadowUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,11 @@ internal static void GetScaleAndBiasForLinearDistanceFade(float fadeDistance, fl
{
// To avoid division from zero
// This values ensure that fade within cascade will be 0 and outside 1
if (border == 0)
if (border < 0.0001f)
{
scale = 1;
bias = -fadeDistance;
float multiplier = 1000f; // To avoid blending if difference is in fractions
scale = multiplier;
bias = -fadeDistance * multiplier;
return;
}

Expand Down