@@ -16,6 +16,8 @@ static class Styles
16
16
public static readonly GUIContent nlmAlpha = new GUIContent ( "Alpha" , "" ) ;
17
17
public static readonly GUIContent nlmK = new GUIContent ( "K" , "" ) ;
18
18
19
+ public static readonly GUIContent aiModelType = new GUIContent ( "Emphasis" , "" ) ;
20
+
19
21
public static readonly GUIContent fineTuningTitle = new GUIContent ( "Fine Tuning" , "" ) ;
20
22
public static readonly GUIContent samplerBias = new GUIContent ( "Sampler Bias" , "" ) ;
21
23
@@ -24,8 +26,8 @@ static class Styles
24
26
public static readonly GUIContent isolateCellIdx = new GUIContent ( "Cell index" , "" ) ;
25
27
public static readonly GUIContent showInvalidProbes = new GUIContent ( "Show Invalid Probes" , "" ) ;
26
28
27
- public static readonly string [ ] kernelFilterTypeOptions = new string [ ] { "Box" , "Epanechnikov" , "NLM" } ;
28
-
29
+ public static readonly string [ ] kernelFilterTypeOptions = new string [ ] { "Box" , "Epanechnikov" , "NLM" , "AI" } ;
30
+ public static readonly string [ ] aiModelTypeOptions = new string [ ] { "Noise removal" , "Detail preservation" } ;
29
31
}
30
32
31
33
// PropertyDrawer are not made to use GUILayout, so it will try to reserve a rect before calling OnGUI
@@ -49,17 +51,28 @@ public override void OnGUI(Rect position, SerializedProperty property, GUIConten
49
51
var kernelFilterType = property . FindPropertyRelative ( "kernelFilterType" ) ;
50
52
kernelFilterType . intValue = EditorGUILayout . Popup ( Styles . kernelFilterType , kernelFilterType . intValue , Styles . kernelFilterTypeOptions ) ;
51
53
52
- var kernelSize = property . FindPropertyRelative ( "kernelSize" ) ;
53
- kernelSize . intValue = EditorGUILayout . IntSlider ( Styles . kernelSize , kernelSize . intValue , 0 , 5 ) ;
54
+ if ( kernelFilterType . intValue != ( int ) ProbeVolumeDenoiserSettings . KernelFilterType . kAI )
55
+ {
56
+ var kernelSize = property . FindPropertyRelative ( "kernelSize" ) ;
57
+ kernelSize . intValue = EditorGUILayout . IntSlider ( Styles . kernelSize , kernelSize . intValue , 0 , 5 ) ;
54
58
55
- var nlmM = property . FindPropertyRelative ( "nlmM" ) ;
56
- nlmM . intValue = EditorGUILayout . IntSlider ( Styles . nlmM , nlmM . intValue , 0 , 2 ) ;
59
+ if ( kernelFilterType . intValue == ( int ) ProbeVolumeDenoiserSettings . KernelFilterType . kNLM )
60
+ {
61
+ var nlmM = property . FindPropertyRelative ( "nlmM" ) ;
62
+ nlmM . intValue = EditorGUILayout . IntSlider ( Styles . nlmM , nlmM . intValue , 0 , 2 ) ;
57
63
58
- var nlmAlpha = property . FindPropertyRelative ( "nlmAlpha" ) ;
59
- nlmAlpha . floatValue = EditorGUILayout . Slider ( Styles . nlmAlpha , nlmAlpha . floatValue , 0.0f , 3.0f ) ;
64
+ var nlmAlpha = property . FindPropertyRelative ( "nlmAlpha" ) ;
65
+ nlmAlpha . floatValue = EditorGUILayout . Slider ( Styles . nlmAlpha , nlmAlpha . floatValue , 0.0f , 3.0f ) ;
60
66
61
- var nlmK = property . FindPropertyRelative ( "nlmK" ) ;
62
- nlmK . floatValue = EditorGUILayout . Slider ( Styles . nlmK , nlmK . floatValue , 0.0f , 3.0f ) ;
67
+ var nlmK = property . FindPropertyRelative ( "nlmK" ) ;
68
+ nlmK . floatValue = EditorGUILayout . Slider ( Styles . nlmK , nlmK . floatValue , 0.0f , 3.0f ) ;
69
+ }
70
+ }
71
+ else
72
+ {
73
+ var aiModelType = property . FindPropertyRelative ( "aiModelType" ) ;
74
+ aiModelType . intValue = EditorGUILayout . Popup ( Styles . aiModelType , aiModelType . intValue , Styles . aiModelTypeOptions ) ;
75
+ }
63
76
}
64
77
}
65
78
0 commit comments