10 private SerializedObject serObj;
12 private SerializedProperty mode;
14 private SerializedProperty showGeneratedNormals;
15 private SerializedProperty offsetScale;
16 private SerializedProperty blurRadius;
17 private SerializedProperty dlaaSharp;
19 private SerializedProperty edgeThresholdMin;
20 private SerializedProperty edgeThreshold;
21 private SerializedProperty edgeSharpness;
24 private void OnEnable()
26 serObj =
new SerializedObject(target);
28 mode = serObj.FindProperty(
"mode");
30 showGeneratedNormals = serObj.FindProperty(
"showGeneratedNormals");
31 offsetScale = serObj.FindProperty(
"offsetScale");
32 blurRadius = serObj.FindProperty(
"blurRadius");
33 dlaaSharp = serObj.FindProperty(
"dlaaSharp");
35 edgeThresholdMin = serObj.FindProperty(
"edgeThresholdMin");
36 edgeThreshold = serObj.FindProperty(
"edgeThreshold");
37 edgeSharpness = serObj.FindProperty(
"edgeSharpness");
41 public override void OnInspectorGUI()
45 GUILayout.Label(
"Luminance based fullscreen antialiasing", EditorStyles.miniBoldLabel);
47 EditorGUILayout.PropertyField(mode,
new GUIContent(
"Technique"));
49 Material mat = (target as
Antialiasing).CurrentAAMaterial();
52 EditorGUILayout.HelpBox(
"This AA technique is currently not supported. Choose a different technique or disable the effect and use MSAA instead.", MessageType.Warning);
55 if (mode.enumValueIndex == (
int) AAMode.NFAA)
57 EditorGUILayout.PropertyField(offsetScale,
new GUIContent(
"Edge Detect Ofs"));
58 EditorGUILayout.PropertyField(blurRadius,
new GUIContent(
"Blur Radius"));
59 EditorGUILayout.PropertyField(showGeneratedNormals,
new GUIContent(
"Show Normals"));
61 else if (mode.enumValueIndex == (
int) AAMode.DLAA)
63 EditorGUILayout.PropertyField(dlaaSharp,
new GUIContent(
"Sharp"));
65 else if (mode.enumValueIndex == (
int) AAMode.FXAA3Console)
67 EditorGUILayout.PropertyField(edgeThresholdMin,
new GUIContent(
"Edge Min Threshhold"));
68 EditorGUILayout.PropertyField(edgeThreshold,
new GUIContent(
"Edge Threshhold"));
69 EditorGUILayout.PropertyField(edgeSharpness,
new GUIContent(
"Edge Sharpness"));
72 serObj.ApplyModifiedProperties();
A Utility class for performing various image based rendering tasks.