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 @@ -264,6 +264,11 @@ public class Styles
public static readonly GUIContent[] shadowBitDepthNames = { new GUIContent("32 bit"), new GUIContent("16 bit") };
public static readonly int[] shadowBitDepthValues = { (int)DepthBits.Depth32, (int)DepthBits.Depth16 };

// TEMP: HDShadowFilteringQuality.VeryHigh - This filtering mode is not ready so disabling in UI
// To re-enable remove the two following light and re-enable the third one
public static readonly GUIContent[] shadowFilteringNames = { new GUIContent("Low"), new GUIContent("Medium"), new GUIContent("High") };
public static readonly int[] shadowFilteringValue = { 0, 1, 2 };

public const string memoryDrawback = "Adds GPU memory";
public const string shaderVariantDrawback = "Adds Shader Variants";
public const string lotShaderVariantDrawback = "Adds multiple Shader Variants";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,11 @@ static void Drawer_SectionShadows(SerializedHDRenderPipelineAsset serialized, Ed

if (!serialized.renderPipelineSettings.supportedLitShaderMode.hasMultipleDifferentValues)
{
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.hdShadowInitParams.shadowFilteringQuality, Styles.filteringQuality);
// TEMP: HDShadowFilteringQuality.VeryHigh - This filtering mode is not ready so disabling in UI
// To re-enable remove the wo following light and re-enable the third one
int value = EditorGUILayout.IntPopup(Styles.filteringQuality, serialized.renderPipelineSettings.hdShadowInitParams.shadowFilteringQuality.enumValueIndex, Styles.shadowFilteringNames, Styles.shadowFilteringValue);
serialized.renderPipelineSettings.hdShadowInitParams.shadowFilteringQuality.enumValueIndex = value;
//EditorGUILayout.PropertyField(serialized.renderPipelineSettings.hdShadowInitParams.shadowFilteringQuality, Styles.filteringQuality);
Comment on lines +359 to +363
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to disable the entry maybe is better to do it this way:

image

Suggested change
// TEMP: HDShadowFilteringQuality.VeryHigh - This filtering mode is not ready so disabling in UI
// To re-enable remove the wo following light and re-enable the third one
int value = EditorGUILayout.IntPopup(Styles.filteringQuality, serialized.renderPipelineSettings.hdShadowInitParams.shadowFilteringQuality.enumValueIndex, Styles.shadowFilteringNames, Styles.shadowFilteringValue);
serialized.renderPipelineSettings.hdShadowInitParams.shadowFilteringQuality.enumValueIndex = value;
//EditorGUILayout.PropertyField(serialized.renderPipelineSettings.hdShadowInitParams.shadowFilteringQuality, Styles.filteringQuality);
serialized.renderPipelineSettings.hdShadowInitParams.shadowFilteringQuality.intValue = (int)(HDShadowFilteringQuality)EditorGUILayout.EnumPopup(
Styles.filteringQuality,
(HDShadowFilteringQuality)serialized.renderPipelineSettings.hdShadowInitParams.shadowFilteringQuality.intValue,
e => (HDShadowFilteringQuality)e != HDShadowFilteringQuality.VeryHigh, /* TEMP: HDShadowFilteringQuality.VeryHigh - This filtering mode is not ready so disabling in UI */
false);

It will still be visible, but users won't be able to select it from the UI, Also you do not need the GUIContents

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion and it is what I wanted to do initially but don't know how, so good. But it is preferable to hide it fully, otherwise we will get various question about how to enable it. i.e users will think there is a settings somewhere to enable it whereas the feature is not implemented at all...

}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ void GetBuiltinData(FragInputs input, float3 V, inout PositionInputs posInput, S
float3 emissiveRcpExposure = builtinData.emissiveColor * GetInverseCurrentExposureMultiplier();
builtinData.emissiveColor = lerp(emissiveRcpExposure, builtinData.emissiveColor, _EmissiveExposureWeight);

#if (SHADERPASS == SHADERPASS_DISTORTION) || defined(DEBUG_DISPLAY)
float3 distortion = SAMPLE_TEXTURE2D(_DistortionVectorMap, sampler_DistortionVectorMap, input.texCoord0.xy).rgb;
distortion.rg = distortion.rg * _DistortionVectorScale.xx + _DistortionVectorBias.xx;
builtinData.distortion = distortion.rg * _DistortionScale;
builtinData.distortionBlur = clamp(distortion.b * _DistortionBlurScale, 0.0, 1.0) * (_DistortionBlurRemapMax - _DistortionBlurRemapMin) + _DistortionBlurRemapMin;
#endif

builtinData.depthOffset = depthOffset;

PostInitBuiltinData(V, posInput, surfaceData, builtinData);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
// Otherwise those parameters are not bound correctly at runtime.
// ===========================================================================

TEXTURE2D(_DistortionVectorMap);
SAMPLER(sampler_DistortionVectorMap);

TEXTURE2D(_EmissiveColorMap);
SAMPLER(sampler_EmissiveColorMap);

Expand Down Expand Up @@ -108,12 +105,6 @@ float _AlphaCutoffShadow;
float _AlphaCutoffPrepass;
float _AlphaCutoffPostpass;
float4 _DoubleSidedConstants;
float _DistortionScale;
float _DistortionVectorScale;
float _DistortionVectorBias;
float _DistortionBlurScale;
float _DistortionBlurRemapMin;
float _DistortionBlurRemapMax;
float _BlendMode;
float _EnableBlendModePreserveSpecularLighting;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,6 @@ CBUFFER_END
#endif
#endif

// Declare distortion variables just to make the code compile with the Debug Menu.
// See LitBuiltinData.hlsl:73.
TEXTURE2D(_DistortionVectorMap);
SAMPLER(sampler_DistortionVectorMap);

float _DistortionScale;
float _DistortionVectorScale;
float _DistortionVectorBias;
float _DistortionBlurScale;
float _DistortionBlurRemapMin;
float _DistortionBlurRemapMax;

#ifdef _ALPHATEST_ON
TEXTURE2D(_TerrainHolesTexture);
SAMPLER(sampler_TerrainHolesTexture);
Expand Down