add slider to property drawers in mtoon10 showcase

This commit is contained in:
amamagi 2025-04-09 16:59:06 +09:00
parent 91a1f6607f
commit 3189def11a
7 changed files with 29 additions and 22 deletions

View File

@ -10,8 +10,8 @@ namespace VRM10.Samples.MToon10Showcase
{
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(AlphaModeShowcase.AlphaModeEntry.alphaMode)));
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(AlphaModeShowcase.AlphaModeEntry.alphaCutoff)));
EditorGUILayout.Slider(
property.FindPropertyRelative(nameof(AlphaModeShowcase.AlphaModeEntry.alphaCutoff)), 0, 1);
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(AlphaModeShowcase.AlphaModeEntry.doubleSidedMode)));
EditorGUILayout.PropertyField(

View File

@ -8,8 +8,9 @@ namespace VRM10.Samples.MToon10Showcase
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(GIEqualizationShowcase.GIEqualizationEntry.giEqualizationFactor)));
EditorGUILayout.Slider(
property.FindPropertyRelative(nameof(GIEqualizationShowcase.GIEqualizationEntry.giEqualizationFactor)),
0, 1);
}
}
}

View File

@ -10,14 +10,16 @@ namespace VRM10.Samples.MToon10Showcase
{
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(OutlineShowcase.OutlineEntry.outlineWidthMode)));
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(OutlineShowcase.OutlineEntry.outlineWidthFactor)));
EditorGUILayout.Slider(
property.FindPropertyRelative(nameof(OutlineShowcase.OutlineEntry.outlineWidthFactor)),
0, 0.05f);
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(OutlineShowcase.OutlineEntry.outlineColorFactor)));
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(OutlineShowcase.OutlineEntry.outlineWidthMultiplyTexture)));
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(OutlineShowcase.OutlineEntry.outlineLightingMixFactor)));
EditorGUILayout.Slider(
property.FindPropertyRelative(nameof(OutlineShowcase.OutlineEntry.outlineLightingMixFactor)),
0, 1);
}
}
}

View File

@ -10,11 +10,11 @@ namespace VRM10.Samples.MToon10Showcase
{
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(ParametricRimShowcase.ParametricRimEntry.parametricRimColor)));
EditorGUILayout.PropertyField(property.FindPropertyRelative(nameof(ParametricRimShowcase.ParametricRimEntry
.parametricRimFresnelPowerFactor)));
EditorGUILayout.PropertyField(
EditorGUILayout.Slider(property.FindPropertyRelative(nameof(ParametricRimShowcase.ParametricRimEntry
.parametricRimFresnelPowerFactor)), 0, 100);
EditorGUILayout.Slider(
property.FindPropertyRelative(nameof(ParametricRimShowcase.ParametricRimEntry
.parametricRimLiftFactor)));
.parametricRimLiftFactor)), 0, 1);
}
}
}

View File

@ -10,10 +10,11 @@ namespace VRM10.Samples.MToon10Showcase
{
EditorGUILayout.PropertyField(
property.FindPropertyRelative(
nameof(RimLightingShowcase.RimLightingMixFactorEntry.rimLightingMixFactor)));
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(RimLightingShowcase.RimLightingMixFactorEntry
.rimMultiplyTexture)));
nameof(RimLightingShowcase.RimLightingMixFactorEntry.rimMultiplyTexture)));
EditorGUILayout.Slider(
property.FindPropertyRelative(
nameof(RimLightingShowcase.RimLightingMixFactorEntry.rimLightingMixFactor)),
0, 1);
}
}
}

View File

@ -10,8 +10,9 @@ namespace VRM10.Samples.MToon10Showcase
{
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(ShadingShiftShowcase.ShadingShiftEntry.shadingShiftTexture)));
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(ShadingShiftShowcase.ShadingShiftEntry.shadingShiftTextureScale)));
EditorGUILayout.Slider(
property.FindPropertyRelative(nameof(ShadingShiftShowcase.ShadingShiftEntry.shadingShiftTextureScale)),
-3f, 3f);
}
}
}

View File

@ -8,10 +8,12 @@ namespace VRM10.Samples.MToon10Showcase
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(ShadingToonyShowcase.ShadingToonyEntry.shadingToonyFactor)));
EditorGUILayout.PropertyField(
property.FindPropertyRelative(nameof(ShadingToonyShowcase.ShadingToonyEntry.shadingShiftFactor)));
EditorGUILayout.Slider(
property.FindPropertyRelative(nameof(ShadingToonyShowcase.ShadingToonyEntry.shadingToonyFactor)),
0f, 1f);
EditorGUILayout.Slider(
property.FindPropertyRelative(nameof(ShadingToonyShowcase.ShadingToonyEntry.shadingShiftFactor)),
-1f, 1f);
}
}
}