Skip to content

Commit 90a93e4

Browse files
Do shadow code cleanup + Fix Yamato after PR #5 Multi compile shadow (#244)
* Do code cleanup + bugfix shadow * Update Upgrading-from-2020.1-to-2020.2.md * Update LightLoopDef.hlsl
1 parent de5ed64 commit 90a93e4

File tree

28 files changed

+75
-81
lines changed

28 files changed

+75
-81
lines changed
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading

com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,4 +1260,7 @@ float SharpenAlpha(float alpha, float alphaClipTreshold)
12601260
return saturate((alpha - alphaClipTreshold) / max(fwidth(alpha), 0.0001) + 0.5);
12611261
}
12621262

1263+
// These clamping function to max of floating point 16 bit are use to prevent INF in code in case of extreme value
1264+
TEMPLATE_1_REAL(ClampToFloat16Max, value, return min(value, HALF_MAX))
1265+
12631266
#endif // UNITY_COMMON_INCLUDED

com.unity.render-pipelines.core/ShaderLibrary/CommonLighting.hlsl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#ifndef UNITY_COMMON_LIGHTING_INCLUDED
22
#define UNITY_COMMON_LIGHTING_INCLUDED
33

4-
// These clamping function to max of floating point 16 bit are use to prevent INF in code in case of extreme value
5-
TEMPLATE_1_REAL(ClampToFloat16Max, value, return min(value, HALF_MAX))
6-
74
// Ligthing convention
85
// Light direction is oriented backward (-Z). i.e in shader code, light direction is -lightData.forward
96

com.unity.render-pipelines.high-definition/Documentation~/Upgrading-from-2020.1-to-2020.2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ In the High Definition Render Pipeline (HDRP), some features work differently be
44

55
## Shadows
66

7-
From Unity 2020.2, it is not necessary to change the [HDRP Config package](HDRP-Config-Package.html) in order to set the [Shadows filtering quality](HDRP-Asset.html#FilteringQualities) for Deferred rendering. Instead the filtering quality can be simply set on the [HDRP Asset](HDRP-Asset.html#FilteringQualities) similarly to what was previously setting only the quality for Forward.
7+
From Unity 2020.2, it is not necessary to change the [HDRP Config package](HDRP-Config-Package.html) in order to set the [Shadows filtering quality](HDRP-Asset.html#FilteringQualities) for Deferred rendering. Instead the filtering quality can be simply set on the [HDRP Asset](HDRP-Asset.html#FilteringQualities) similarly to what was previously setting only the quality for Forward. Note that if previously the Shadow filtering quality wasn't setup on medium on the HDRP Asset you will experience a change of shadow quality as now it will be taken into account.
88

com.unity.render-pipelines.high-definition/Editor/Material/Unlit/ShaderGraph/HDUnlitPass.template

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ Pass
4848
#if defined(_ENABLE_SHADOW_MATTE) && SHADERPASS == SHADERPASS_FORWARD_UNLIT
4949
#define LIGHTLOOP_DISABLE_TILE_AND_CLUSTER
5050
#define HAS_LIGHTLOOP
51-
#define SHADOW_OPTIMIZE_REGISTER_USAGE 1
5251
#endif
5352

5453
// Dots Instancing

0 commit comments

Comments
 (0)