浏览代码

Inverted the order of high and low precision for better compatibility with scenes that don't have any algorithm set. 0 will now default to 32bit precision PCF 1 tap.

/main
uygar 8 年前
当前提交
612f8c68
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 8
      Assets/ScriptableRenderPipeline/HDRenderPipeline/Shadow/ShadowBase.cs

8
Assets/ScriptableRenderPipeline/HDRenderPipeline/Shadow/ShadowBase.cs


public enum ShadowPrecision // 1 bits
{
Low,
High
High,
Low
}
[GenerateHLSL]

if( e.variantDels[(int)shadowVariant].low != null && e.variantDels[(int)shadowVariant].high != null )
{
GUIContent[] precDescs = new GUIContent[] { new GUIContent( "Low" ), new GUIContent( "High" ) };
GUIContent[] precDescs = new GUIContent[] { new GUIContent( "High" ), new GUIContent( "Low" ) };
int[] precOptions = new int[] { 0, 1 };
shadowPrecision = (ShadowPrecision)UnityEditor.EditorGUILayout.IntPopup((int)shadowPrecision, precDescs, precOptions, GUILayout.MaxWidth(65));
}

{
GUIContent[] precDescs = new GUIContent[] { new GUIContent( e.variantDels[(int)shadowVariant].low == null ? "High" : "Low" ) };
int[] precOptions = new int[] { e.variantDels[(int)shadowVariant].low == null ? 1 : 0 };
int[] precOptions = new int[] { e.variantDels[(int)shadowVariant].low == null ? 0 : 1 };
UnityEditor.EditorGUILayout.IntPopup(precOptions[0], precDescs, precOptions, GUILayout.MaxWidth(65));
shadowPrecision = (ShadowPrecision) precOptions[0];
}

正在加载...
取消
保存