Skip to content

Commit ab6049f

Browse files
CA-Tatamiclaude
andcommitted
fix: TriTone GUIプレビューでアルファ値を無視するように修正
シェーダー側ではRGB値のみを使用してアルファ値は反映されないため、 GUIプレビューでも同様にアルファ値を1.0に固定して表示するように変更 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3b24a9b commit ab6049f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Assets/Nova/Editor/Core/Scripts/ParticlesUberCommonGUI.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,11 @@ private void DrawTriToneGradient(Color shadow, Color midtones, Color highlight,
971971
Rect rect = EditorGUILayout.GetControlRect(false, 24);
972972
rect = EditorGUI.IndentedRect(rect);
973973

974+
// Force alpha to 1.0 to match shader behavior (RGB only)
975+
shadow.a = 1.0f;
976+
midtones.a = 1.0f;
977+
highlight.a = 1.0f;
978+
974979
const int steps = 256;
975980
for (int i = 0; i < steps; i++)
976981
{
@@ -982,6 +987,7 @@ private void DrawTriToneGradient(Color shadow, Color midtones, Color highlight,
982987
Color shadowToMidtones = Color.Lerp(shadow, midtones, step1);
983988

984989
color = Color.Lerp(shadowToMidtones, highlight, step2);
990+
color.a = 1.0f; // Ensure alpha is always 1.0
985991

986992
float stepWidth = rect.width / steps;
987993
Rect stepRect = new Rect(rect.x + i * stepWidth, rect.y, stepWidth + 1, rect.height);

0 commit comments

Comments
 (0)