public SerializedProperty contactShadowMaxDistance ;
public SerializedProperty contactShadowFadeDistance ;
public SerializedProperty contactShadowSampleCount ;
// Bias control
public SerializedProperty viewBiasMin ;
public SerializedProperty viewBiasMax ;
public SerializedProperty viewBiasScale ;
public SerializedProperty normalBiasMin ;
public SerializedProperty normalBiasMax ;
public SerializedProperty normalBiasScale ;
public SerializedProperty sampleBiasScale ;
public SerializedProperty edgeLeakFixup ;
public SerializedProperty edgeToleranceNormal ;
public SerializedProperty edgeTolerance ;
}
SerializedObject m_SerializedAdditionalLightData ;
contactShadowMaxDistance = o . Find ( x = > x . contactShadowMaxDistance ) ,
contactShadowFadeDistance = o . Find ( x = > x . contactShadowFadeDistance ) ,
contactShadowSampleCount = o . Find ( x = > x . contactShadowSampleCount ) ,
viewBiasMin = o . Find ( x = > x . viewBiasMin ) ,
viewBiasMax = o . Find ( x = > x . viewBiasMax ) ,
viewBiasScale = o . Find ( x = > x . viewBiasScale ) ,
normalBiasMin = o . Find ( x = > x . normalBiasMin ) ,
normalBiasMax = o . Find ( x = > x . normalBiasMax ) ,
normalBiasScale = o . Find ( x = > x . normalBiasScale ) ,
sampleBiasScale = o . Find ( x = > x . sampleBiasScale ) ,
edgeLeakFixup = o . Find ( x = > x . edgeLeakFixup ) ,
edgeToleranceNormal = o . Find ( x = > x . edgeToleranceNormal ) ,
edgeTolerance = o . Find ( x = > x . edgeTolerance )
} ;
}
}
EditorGUILayout . PropertyField ( m_AdditionalShadowData . resolution , s_Styles . shadowResolution ) ;
EditorGUILayout . Slider ( settings . shadowsBias , 0.001f , 1f , s_Styles . shadowBias ) ;
EditorGUILayout . Slider ( settings . shadowsNormalBias , 0.001f , 1f , s_Styles . shadowNormalBias ) ;
//EditorGUILayout.Slider(settings.shadowsBias, 0.001f, 1f, s_Styles.shadowBias);
//EditorGUILayout.Slider(settings.shadowsNormalBias, 0.001f, 1f, s_Styles.shadowNormalBias);
EditorGUILayout . Slider ( m_AdditionalShadowData . viewBiasScale , 0.0f , 1 5.0f , s_Styles . viewBiasScale ) ;
EditorGUILayout . Slider ( settings . shadowsNearPlane , 0.01f , 1 0f , s_Styles . shadowNearPlane ) ;
if ( settings . lightType . enumValueIndex = = ( int ) LightType . Directional )
EditorGUILayout . PropertyField ( m_AdditionalShadowData . fadeDistance , s_Styles . shadowFadeDistance ) ;
EditorGUILayout . PropertyField ( m_AdditionalShadowData . dimmer , s_Styles . shadowDimmer ) ;
EditorGUILayout . Slider ( m_AdditionalShadowData . viewBiasMin , 0.0f , 5.0f , s_Styles . viewBiasMin ) ;
//EditorGUILayout.PropertyField(m_AdditionalShadowData.viewBiasMax, s_Styles.viewBiasMax);
EditorGUI . BeginChangeCheck ( ) ;
EditorGUILayout . Slider ( m_AdditionalShadowData . normalBiasMin , 0.0f , 5.0f , s_Styles . normalBiasMin ) ;
if ( EditorGUI . EndChangeCheck ( ) )
{
// Link min to max and don't expose normalBiasScale (useless when min == max)
m_AdditionalShadowData . normalBiasMax = m_AdditionalShadowData . normalBiasMin ;
}
//EditorGUILayout.PropertyField(m_AdditionalShadowData.normalBiasMax, s_Styles.normalBiasMax);
//EditorGUILayout.PropertyField(m_AdditionalShadowData.normalBiasScale, s_Styles.normalBiasScale);
//EditorGUILayout.PropertyField(m_AdditionalShadowData.sampleBiasScale, s_Styles.sampleBiasScale);
EditorGUILayout . PropertyField ( m_AdditionalShadowData . edgeLeakFixup , s_Styles . edgeLeakFixup ) ;
//EditorGUILayout.PropertyField(m_AdditionalShadowData.edgeToleranceNormal, s_Styles.edgeToleranceNormal);
//EditorGUILayout.PropertyField(m_AdditionalShadowData.edgeTolerance, s_Styles.edgeTolerance);
EditorGUI . indentLevel - - ;
}
}