fix: some fix

This commit is contained in:
mob-sakai
2026-06-20 06:20:36 +09:00
parent 730aa2bb4d
commit b6b538f64f
4 changed files with 30 additions and 22 deletions
@@ -229,8 +229,6 @@ namespace Coffee.UIEffects.Editors
EditorGUI.indentLevel--; EditorGUI.indentLevel--;
} }
EditorGUI.EndChangeCheck();
// Sampling filter // Sampling filter
DrawSeparator(); DrawSeparator();
if (DrawHeaderPopup(_samplingFilter)) if (DrawHeaderPopup(_samplingFilter))
+28
View File
@@ -273,5 +273,33 @@ namespace Coffee.UIEffects
m_Preset = null; m_Preset = null;
} }
} }
public void SetTarget(UIEffectBase effect)
{
if (effect is UIEffect pEffect)
{
target = pEffect;
preset = null;
useTargetTransform = true;
customRoot = null;
samplingScale = pEffect.samplingScale;
}
else if (effect is UIEffectReplica pReplica)
{
target = pReplica.target;
preset = pReplica.preset;
useTargetTransform = pReplica.useTargetTransform;
customRoot = pReplica.customRoot;
samplingScale = pReplica.samplingScale;
}
else
{
target = null;
preset = null;
useTargetTransform = true;
customRoot = null;
samplingScale = 1;
}
}
} }
} }
+1 -19
View File
@@ -282,25 +282,7 @@ namespace Coffee.UIEffects
}); });
} }
if (effect is UIEffect pEffect && pEffect.isActiveAndEnabled) replica.SetTarget(effect);
{
replica.target = pEffect;
replica.useTargetTransform = true;
replica.customRoot = null;
}
else if (effect is UIEffectReplica pReplica && pReplica.isActiveAndEnabled)
{
replica.target = pReplica.target;
replica.preset = pReplica.preset;
replica.useTargetTransform = pReplica.useTargetTransform;
replica.customRoot = pReplica.customRoot;
}
else
{
replica.target = null;
replica.customRoot = null;
}
subMeshUI.GetComponents(subModifiers); subMeshUI.GetComponents(subModifiers);
foreach (var modifier in subModifiers) foreach (var modifier in subModifiers)
{ {
+1 -1
View File
@@ -614,7 +614,7 @@ half4 uieffect(half4 origin, float2 uv, float4 uvMask, float4 wpos, UIEFFECT_FRA
uvMask.x += 4; uvMask.x += 4;
} }
const float isShadow = uvMask.x < 0 ? 1 : 0; const float isShadow = uvMask.x < -1 ? 1 : 0;
uvMask.x += isShadow * 2; uvMask.x += isShadow * 2;
// Sampling.Pixelation // Sampling.Pixelation