mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-19 17:22:37 +08:00
fix: some fix
This commit is contained in:
@@ -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))
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user