Skip to content

Commit 7472b36

Browse files
Cleaun shader config for shadow (#917)
* Move HDShadowFilteringQuality to main package as it is not used anymore * Update Upgrading-from-2020.1-to-2020.2.md
1 parent 4a1351d commit 7472b36

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

com.unity.render-pipelines.high-definition-config/Runtime/ShaderConfig.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@
44

55
namespace UnityEngine.Rendering.HighDefinition
66
{
7-
[GenerateHLSL(PackingRules.Exact)]
8-
public enum HDShadowFilteringQuality
9-
{
10-
Low = 0,
11-
Medium = 1,
12-
High = 2,
13-
}
14-
157
[GenerateHLSL(PackingRules.Exact)]
168
public enum ProbeVolumesEvaluationModes
179
{
@@ -68,9 +60,6 @@ public enum ShaderOptions
6860

6961
AreaLights = 1,
7062

71-
[System.Obsolete("Deferred shadow can now assume any value, so this field is not used anymore.")]
72-
DeferredShadowFiltering = HDShadowFilteringQuality.Medium,
73-
7463
BarnDoor = 0
7564
};
7665

@@ -91,7 +80,5 @@ public class ShaderConfig
9180
public static ProbeVolumesEncodingModes s_ProbeVolumesEncodingMode = (ProbeVolumesEncodingModes)ShaderOptions.ProbeVolumesEncodingMode;
9281
public static int s_AreaLights = (int)ShaderOptions.AreaLights;
9382
public static int s_BarnDoor = (int)ShaderOptions.BarnDoor;
94-
[System.Obsolete("Deferred shadow can now assume any value, so this field is not used anymore.")]
95-
public static HDShadowFilteringQuality s_DeferredShadowFiltering = (HDShadowFilteringQuality)ShaderOptions.DeferredShadowFiltering;
9683
}
9784
}

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ HDRP now stores OnEnable and OnDemand shadows in a separate atlas and more API i
3737

3838
The shader function `SampleShadow_PCSS` now requires you to pass in an additional float2 parameter which contains the shadow atlas resolution in x and the inverse of the atlas resolution in y.
3939

40+
## Shader config file
41+
42+
From Unity 2020.2, due to the change of shadow map, the enum HDShadowFilteringQuality have been moved to HDShadowManager.cs and the variables ShaderConfig.s_DeferredShadowFiltering as well as the option ShaderOptions.DeferredShadowFiltering have been removed from the code as they have no impact anymore.
43+
44+
4045
## Shader code
4146

4247
From Unity 2020.2, HDRP uses a new structure to output information from the LightLoop. It now uses a custom LightLoop struct instead of the `float3 diffuseLighting`, `float3 specularLighting` pair. This is to allow HDRP to export more information from the LightLoop in the future without breaking the API.
@@ -88,4 +93,4 @@ With:
8893

8994
```
9095
protected override void Execute(CustomPassContext ctx) { ... }
91-
```
96+
```

com.unity.render-pipelines.high-definition/Runtime/Lighting/Shadow/HDShadowManager.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@
55

66
namespace UnityEngine.Rendering.HighDefinition
77
{
8+
/// <summary>
9+
/// Shadow Filtering Quality
10+
/// </summary>
11+
public enum HDShadowFilteringQuality
12+
{
13+
Low = 0,
14+
Medium = 1,
15+
High = 2,
16+
}
17+
818
enum ShadowMapType
919
{
1020
CascadedDirectional,

0 commit comments

Comments
 (0)