Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ static HDLightUI()
CED.AdditionalPropertiesFoldoutGroup(s_Styles.shadowMapSubHeader, Expandable.ShadowMap, k_ExpandedState, AdditionalProperties.Shadow, k_AdditionalPropertiesState,
DrawShadowMapContent, DrawShadowMapAdditionalContent, FoldoutOption.SubFoldout | FoldoutOption.Indent | FoldoutOption.NoSpaceAtEnd)),
CED.space,
CED.Conditional((serialized, owner) => k_AdditionalPropertiesState[AdditionalProperties.Shadow] && HasShadowQualitySettingsUI(HDShadowFilteringQuality.VeryHigh, serialized, owner),
CED.FoldoutGroup(s_Styles.veryHighShadowQualitySubHeader, Expandable.ShadowQuality, k_ExpandedState, FoldoutOption.SubFoldout | FoldoutOption.Indent, DrawVeryHighShadowSettingsContent)),
CED.Conditional((serialized, owner) => k_AdditionalPropertiesState[AdditionalProperties.Shadow] && HasShadowQualitySettingsUI(HDShadowFilteringQuality.High, serialized, owner),
CED.FoldoutGroup(s_Styles.highShadowQualitySubHeader, Expandable.ShadowQuality, k_ExpandedState, FoldoutOption.SubFoldout | FoldoutOption.Indent, DrawHighShadowSettingsContent)),
CED.Conditional((serialized, owner) => HasShadowQualitySettingsUI(HDShadowFilteringQuality.Medium, serialized, owner),
Expand Down Expand Up @@ -1339,9 +1341,8 @@ static void DrawHighShadowSettingsContent(SerializedHDLight serialized, Editor o

static void DrawVeryHighShadowSettingsContent(SerializedHDLight serialized, Editor owner)
{
EditorGUILayout.PropertyField(serialized.kernelSize, s_Styles.kernelSize);
EditorGUILayout.PropertyField(serialized.lightAngle, s_Styles.lightAngle);
EditorGUILayout.PropertyField(serialized.maxDepthBias, s_Styles.maxDepthBias);
// Same as high for now (PCSS)
DrawHighShadowSettingsContent(serialized, owner);
}

static void SetLightsDirty(Editor owner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2377,7 +2377,7 @@ void SetCommonShadowRequestSettings(HDShadowRequest shadowRequest, VisibleLight
// This base bias is a good value if we expose a [0..1] since values within [0..5] are empirically shown to be sensible for the slope-scale bias with the width of our PCF.
float baseBias = 5.0f;
// If we are PCSS, the blur radius can be quite big, hence we need to tweak up the slope bias
if (filteringQuality == HDShadowFilteringQuality.High)
if (filteringQuality == HDShadowFilteringQuality.High || filteringQuality == HDShadowFilteringQuality.VeryHigh)
{
if (softness > 0.01f)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ public static DirectionalShadowAlgorithm GetDirectionalShadowAlgorithm()
{
return DirectionalShadowAlgorithm.PCSS;
}
case HDShadowFilteringQuality.VeryHigh:
{
return DirectionalShadowAlgorithm.PCSS;
}
}
;
return DirectionalShadowAlgorithm.PCF5x5;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ void InitializeScreenSpaceShadows()
case HDShadowFilteringQuality.High:
s_ScreenSpaceShadowsMat.EnableKeyword("SHADOW_HIGH");
break;
case HDShadowFilteringQuality.VeryHigh:
s_ScreenSpaceShadowsMat.EnableKeyword("SHADOW_VERY_HIGH");
break;
default:
s_ScreenSpaceShadowsMat.EnableKeyword("SHADOW_MEDIUM");
break;
Expand Down