Added new stocking surface feature; Added unity 6.3 support; Fixed the issue that ssr weight does not blend ibl and ssr properly; Fixed the issue that material recive ssr regardless of specular ambient mode;
55 lines
2.2 KiB
C#
55 lines
2.2 KiB
C#
using Misaki.ShaderGUI;
|
|
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
using static Misaki.HdrpToon.UTSPropertyName.Advance;
|
|
|
|
namespace Misaki.HdrpToon.Editor
|
|
{
|
|
internal class AdvanceScope : MaterialUIScope<ShaderGUIExpandable>
|
|
{
|
|
private static class Properties
|
|
{
|
|
public static MaterialProperty diffuseMin;
|
|
|
|
public static MaterialProperty lightIntensityMultiplier;
|
|
public static MaterialProperty clampLightColor;
|
|
|
|
public static MaterialProperty lightLoopMode;
|
|
}
|
|
|
|
private static class Styles
|
|
{
|
|
public static readonly GUIContent diffuseMinText = new("Minimal Diffuse Contribution", "Specifies the minimum contribution of the base color to the diffuse light. Keep it 0 to make sure energy conservation.");
|
|
|
|
public static readonly GUIContent lightIntensityMultiplierText = new("Light Intensity Multiplier", "Specifies the intensity multiplier of the light.");
|
|
public static readonly GUIContent clampLightColorText = new("Clamp Light Color", "Specifies whether to clamp the light color.");
|
|
|
|
public static readonly GUIContent lightLoopModeText = new("Light Loop Mode", "Specifies the light loop mode.");
|
|
}
|
|
|
|
protected override ShaderGUIExpandable ExpandableBit => ShaderGUIExpandable.Advance;
|
|
|
|
protected override GUIContent Header => EditorGUIUtility.TrTextContent("Advance Settings");
|
|
|
|
protected override void LoadMaterialProperties()
|
|
{
|
|
Properties.diffuseMin = FindProperty(MINIMAL_DIFFUSE_CONTRIBUTION);
|
|
|
|
Properties.lightIntensityMultiplier = FindProperty(LIGHT_INTENSITY_MULTIPLIER);
|
|
Properties.clampLightColor = FindProperty(CLAMP_LIGHT_COLOR);
|
|
|
|
Properties.lightLoopMode = FindProperty(LIGHT_LOOP_MODE);
|
|
}
|
|
|
|
protected override void DrawContent()
|
|
{
|
|
editor.ShaderProperty(Properties.diffuseMin, Styles.diffuseMinText);
|
|
|
|
editor.ShaderProperty(Properties.lightIntensityMultiplier, Styles.lightIntensityMultiplierText);
|
|
editor.ShaderProperty(Properties.clampLightColor, Styles.clampLightColorText);
|
|
|
|
editor.ShaderProperty(Properties.lightLoopMode, Styles.lightLoopModeText);
|
|
}
|
|
}
|
|
} |