Added new stocking scope to shader gui;
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;
This commit is contained in:
@@ -6,7 +6,7 @@ using static Misaki.HdrpToon.UTSPropertyName.Advance;
|
||||
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
public class AdvanceScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
internal class AdvanceScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
{
|
||||
private static class Properties
|
||||
{
|
||||
@@ -32,7 +32,7 @@ namespace Misaki.HdrpToon.Editor
|
||||
|
||||
protected override GUIContent Header => EditorGUIUtility.TrTextContent("Advance Settings");
|
||||
|
||||
public override void LoadMaterialProperties()
|
||||
protected override void LoadMaterialProperties()
|
||||
{
|
||||
Properties.diffuseMin = FindProperty(MINIMAL_DIFFUSE_CONTRIBUTION);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
public class AmbientScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
internal class AmbientScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
{
|
||||
protected override ShaderGUIExpandable ExpandableBit => ShaderGUIExpandable.Ambient;
|
||||
protected override GUIContent Header => new("Ambient Settings");
|
||||
@@ -52,7 +52,7 @@ namespace Misaki.HdrpToon.Editor
|
||||
public static readonly GUIContent ssrWeightText = new("SSR Weight", "SSR Weight");
|
||||
}
|
||||
|
||||
public override void LoadMaterialProperties()
|
||||
protected override void LoadMaterialProperties()
|
||||
{
|
||||
Properties.indirectDiffuseMode = FindProperty("_Indirect_Diffuse_Mode");
|
||||
Properties.indirectSpecularMode = FindProperty("_Indirect_Specular_Mode");
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Misaki.HdrpToon.Editor
|
||||
|
||||
protected override GUIContent Header => EditorGUIUtility.TrTextContent("Angel Ring Settings");
|
||||
|
||||
public override void LoadMaterialProperties()
|
||||
protected override void LoadMaterialProperties()
|
||||
{
|
||||
Properties.angelRingColor = FindProperty(ANGEL_RING_COLOR);
|
||||
Properties.angelRingColorMap = FindProperty(ANGEL_RING_COLOR_MAP);
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Misaki.HdrpToon.Editor
|
||||
|
||||
protected override GUIContent Header => EditorGUIUtility.TrTextContent("Outline Settings");
|
||||
|
||||
public override void LoadMaterialProperties()
|
||||
protected override void LoadMaterialProperties()
|
||||
{
|
||||
Properties.outlineState = FindProperty(OUTLINE_STATE);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ using static Misaki.HdrpToon.UTSPropertyName.RimLight;
|
||||
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
public class RimLightScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
internal class RimLightScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
{
|
||||
private static class Properties
|
||||
{
|
||||
@@ -43,7 +43,7 @@ namespace Misaki.HdrpToon.Editor
|
||||
protected override GUIContent Header => EditorGUIUtility.TrTextContent("Rim Light Settings");
|
||||
protected override bool ShowSection => materials.All(mat => mat.HasFeature(SurfaceFeature.RimLight));
|
||||
|
||||
public override void LoadMaterialProperties()
|
||||
protected override void LoadMaterialProperties()
|
||||
{
|
||||
Properties.rimLightColor = FindProperty(RIM_LIGHT_COLOR);
|
||||
Properties.rimLightIntensity = FindProperty(RIM_LIGHT_INTENSITY);
|
||||
|
||||
@@ -5,7 +5,7 @@ using UnityEngine;
|
||||
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
public class ShadingColorScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
internal class ShadingColorScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
{
|
||||
private static class Properties
|
||||
{
|
||||
@@ -85,7 +85,7 @@ namespace Misaki.HdrpToon.Editor
|
||||
}
|
||||
}
|
||||
|
||||
public override void LoadMaterialProperties()
|
||||
protected override void LoadMaterialProperties()
|
||||
{
|
||||
Properties.shadingRampMapState = FindProperty("_Use_Shading_Ramp_Map");
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Misaki.HdrpToon.Editor
|
||||
|
||||
protected override GUIContent Header => EditorGUIUtility.TrTextContent("Shadow Settings");
|
||||
|
||||
public override void LoadMaterialProperties()
|
||||
protected override void LoadMaterialProperties()
|
||||
{
|
||||
Properties.receiveLightShadow = FindProperty("_Receive_Light_Shadow");
|
||||
Properties.receiveScreenSpaceShadow = FindProperty("_Receive_Screen_Space_Shadow");
|
||||
|
||||
@@ -1,22 +1,51 @@
|
||||
using Misaki.ShaderGUI;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
using static Misaki.HdrpToon.UTSPropertyName.Stocking;
|
||||
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
public class StockingScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
internal class StockingScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
{
|
||||
private static class Properties
|
||||
{
|
||||
public static MaterialProperty stockingFresnelWidth;
|
||||
public static MaterialProperty stockingSparkleSpacing;
|
||||
public static MaterialProperty stockingSparkleAmount;
|
||||
public static MaterialProperty stockingSparkleSize;
|
||||
public static MaterialProperty stockingSparkleIntensity;
|
||||
}
|
||||
|
||||
private static class Styles
|
||||
{
|
||||
public static readonly GUIContent stockingFresnelWidthText = new("Fresnel Width", "Set the width of the fresnel effect for the stocking.");
|
||||
public static readonly GUIContent stockingSparkleSpacingText = new("Sparkle Spacing", "Set the spacing between sparkles on the stocking.");
|
||||
public static readonly GUIContent stockingSparkleAmountText = new("Sparkle Amount", "Set the amount of sparkles on the stocking.");
|
||||
public static readonly GUIContent stockingSparkleSizeText = new("Sparkle Size", "Set the size of the sparkles on the stocking.");
|
||||
public static readonly GUIContent stockingSparkleIntensityText = new("Sparkle Intensity", "Set the intensity of the sparkle effect for the stocking.");
|
||||
}
|
||||
|
||||
protected override ShaderGUIExpandable ExpandableBit => ShaderGUIExpandable.Stocking;
|
||||
|
||||
protected override GUIContent Header => throw new System.NotImplementedException();
|
||||
protected override GUIContent Header => EditorGUIUtility.TrTextContent("Stocking Settings");
|
||||
|
||||
public override void LoadMaterialProperties()
|
||||
protected override void LoadMaterialProperties()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
Properties.stockingFresnelWidth = FindProperty(STOCKING_FRESNEL_WIDTH);
|
||||
Properties.stockingSparkleSpacing = FindProperty(STOCKING_SPARKLE_SPACING);
|
||||
Properties.stockingSparkleAmount = FindProperty(STOCKING_SPARKLE_AMOUNT);
|
||||
Properties.stockingSparkleSize = FindProperty(STOCKING_SPARKLE_SIZE);
|
||||
Properties.stockingSparkleIntensity = FindProperty(STOCKING_SPARKLE_INTENSITY);
|
||||
}
|
||||
|
||||
protected override void DrawContent()
|
||||
{
|
||||
throw new System.NotImplementedException();
|
||||
editor.ShaderProperty(Properties.stockingFresnelWidth, Styles.stockingFresnelWidthText);
|
||||
editor.ShaderProperty(Properties.stockingSparkleSpacing, Styles.stockingSparkleSpacingText);
|
||||
editor.ShaderProperty(Properties.stockingSparkleAmount, Styles.stockingSparkleAmountText);
|
||||
editor.ShaderProperty(Properties.stockingSparkleSize, Styles.stockingSparkleSizeText);
|
||||
editor.ShaderProperty(Properties.stockingSparkleIntensity, Styles.stockingSparkleIntensityText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ using static Misaki.HdrpToon.UTSPropertyName.SurfaceInputs;
|
||||
|
||||
namespace Misaki.HdrpToon.Editor
|
||||
{
|
||||
public class SurfaceInputsScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
internal class SurfaceInputsScope : MaterialUIScope<ShaderGUIExpandable>
|
||||
{
|
||||
private static class Properties
|
||||
{
|
||||
@@ -75,7 +75,7 @@ namespace Misaki.HdrpToon.Editor
|
||||
protected override ShaderGUIExpandable ExpandableBit => ShaderGUIExpandable.SurfaceInputs;
|
||||
protected override GUIContent Header => new("Surface Inputs");
|
||||
|
||||
public override void LoadMaterialProperties()
|
||||
protected override void LoadMaterialProperties()
|
||||
{
|
||||
Properties.normalMap = FindProperty("_NormalMap");
|
||||
Properties.normalMapScale = FindProperty("_NormalScale");
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Misaki.HdrpToon.Editor
|
||||
|
||||
protected override GUIContent Header => EditorGUIUtility.TrTextContent("Surface Options");
|
||||
|
||||
public override void LoadMaterialProperties()
|
||||
protected override void LoadMaterialProperties()
|
||||
{
|
||||
Properties.surfaceType = FindProperty(SURFACE_TYPE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user