Skip to content

Commit 8776057

Browse files
committed
fix: graphic disappears when changing filters from code
close #382
1 parent ef7ac0a commit 8776057

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Packages/src/Runtime/UIEffect.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ public ToneFilter toneFilter
282282
{
283283
if (m_ToneFilter == value) return;
284284
context.m_ToneFilter = m_ToneFilter = value;
285+
SetVerticesDirty();
285286
SetMaterialDirty();
286287
}
287288
}
@@ -311,6 +312,7 @@ public ColorFilter colorFilter
311312
{
312313
if (m_ColorFilter == value) return;
313314
context.m_ColorFilter = m_ColorFilter = value;
315+
SetVerticesDirty();
314316
SetMaterialDirty();
315317
}
316318
}
@@ -794,6 +796,7 @@ public BlendType blendType
794796
(m_SrcBlendMode, m_DstBlendMode) = (m_BlendType, m_SrcBlendMode, m_DstBlendMode).Convert();
795797
context.m_SrcBlendMode = m_SrcBlendMode;
796798
context.m_DstBlendMode = m_DstBlendMode;
799+
SetVerticesDirty();
797800
SetMaterialDirty();
798801
}
799802
}
@@ -810,6 +813,7 @@ public BlendMode srcBlendMode
810813
if (m_SrcBlendMode == value) return;
811814
context.m_SrcBlendMode = m_SrcBlendMode = value;
812815
m_BlendType = (m_SrcBlendMode, m_DstBlendMode).Convert();
816+
SetVerticesDirty();
813817
SetMaterialDirty();
814818
}
815819
}
@@ -826,6 +830,7 @@ public BlendMode dstBlendMode
826830
if (m_DstBlendMode == value) return;
827831
context.m_DstBlendMode = m_DstBlendMode = value;
828832
m_BlendType = (m_SrcBlendMode, m_DstBlendMode).Convert();
833+
SetVerticesDirty();
829834
SetMaterialDirty();
830835
}
831836
}
@@ -838,6 +843,7 @@ public ShadowMode shadowMode
838843
if (m_ShadowMode == value) return;
839844
context.m_ShadowMode = m_ShadowMode = value;
840845
SetVerticesDirty();
846+
SetVerticesDirty();
841847
}
842848
}
843849

@@ -1013,6 +1019,7 @@ public EdgeMode edgeMode
10131019
{
10141020
if (m_EdgeMode == value) return;
10151021
context.m_EdgeMode = m_EdgeMode = value;
1022+
SetVerticesDirty();
10161023
SetMaterialDirty();
10171024
}
10181025
}
@@ -1182,6 +1189,7 @@ public GradationMode gradationMode
11821189
{
11831190
if (m_GradationMode == value) return;
11841191
context.m_GradationMode = m_GradationMode = value;
1192+
SetVerticesDirty();
11851193
SetMaterialDirty();
11861194
}
11871195
}
@@ -1321,6 +1329,7 @@ public DetailFilter detailFilter
13211329
{
13221330
if (m_DetailFilter == value) return;
13231331
context.m_DetailFilter = m_DetailFilter = value;
1332+
SetVerticesDirty();
13241333
SetMaterialDirty();
13251334
}
13261335
}

0 commit comments

Comments
 (0)