Added UtsEvaluateAngelRing;

Added UTSTonemapping;
This commit is contained in:
Misaki
2025-01-30 22:54:43 +09:00
parent d8b12a0ca9
commit 181a53a3b2
17 changed files with 246 additions and 159 deletions

View File

@@ -11,12 +11,16 @@ namespace Misaki.HdrpToon.Editor
public static MaterialProperty angelRingColor;
public static MaterialProperty angelRingColorMap;
public static MaterialProperty angelRingIntensity;
public static MaterialProperty angelRingOffsetU;
public static MaterialProperty angelRingOffsetV;
}
private static class Styles
{
public static readonly GUIContent angelRingColorText = new("Angel Ring Color", "Specifies the color of the angel ring.");
public static readonly GUIContent angelRingIntensityText = new("Angel Ring Intensity", "Specifies the intensity of the angel ring.");
public static readonly GUIContent angelRingOffsetUText = new("Angel Ring Offset U", "Specifies the offset of the angel ring in the U direction.");
public static readonly GUIContent angelRingOffsetVText = new("Angel Ring Offset V", "Specifies the offset of the angel ring in the V direction.");
}
protected override bool ShowSection => owner.GetUIScope<SurfaceOptionsScope>().HasFeature(SurfaceFeatureFlags.AngelRing);
@@ -30,12 +34,16 @@ namespace Misaki.HdrpToon.Editor
Properties.angelRingColor = FindProperty("_AngelRingColor");
Properties.angelRingColorMap = FindProperty("_AngelRingColorMap");
Properties.angelRingIntensity = FindProperty("_AngelRingIntensity");
Properties.angelRingOffsetU = FindProperty("_AngelRingOffsetU");
Properties.angelRingOffsetV = FindProperty("_AngelRingOffsetV");
}
protected override void DrawContent()
{
editor.TexturePropertySingleLine(Styles.angelRingColorText, Properties.angelRingColorMap, Properties.angelRingColor);
editor.ShaderProperty(Properties.angelRingIntensity, Styles.angelRingIntensityText);
editor.ShaderProperty(Properties.angelRingOffsetU, Styles.angelRingOffsetUText);
editor.ShaderProperty(Properties.angelRingOffsetV, Styles.angelRingOffsetVText);
EditorGUILayout.Space();
editor.TextureScaleOffsetProperty(Properties.angelRingColorMap);

View File

@@ -44,7 +44,7 @@ namespace Misaki.HdrpToon.Editor
public bool HasFeature(SurfaceFeatureFlags feature)
{
return ((SurfaceFeatureFlags)Properties.surfaceFeatures.floatValue & feature) == feature;
return ((SurfaceFeatureFlags)Properties.surfaceFeatures.floatValue & feature) != 0;
}
public override void LoadMaterialProperties()