@@ -177,7 +177,7 @@ public ToneFilter toneFilter
177
177
{
178
178
if ( m_ToneFilter == value ) return ;
179
179
context . toneFilter = m_ToneFilter = value ;
180
- ApplyContextToMaterial ( ) ;
180
+ SetMaterialDirty ( ) ;
181
181
}
182
182
}
183
183
@@ -192,7 +192,7 @@ public float toneIntensity
192
192
value = Mathf . Clamp ( value , 0 , 1 ) ;
193
193
if ( Mathf . Approximately ( m_ToneIntensity , value ) ) return ;
194
194
context . toneIntensity = m_ToneIntensity = value ;
195
- ApplyContextToMaterial ( ) ;
195
+ SetMaterialDirty ( ) ;
196
196
}
197
197
}
198
198
@@ -206,7 +206,7 @@ public ColorFilter colorFilter
206
206
{
207
207
if ( m_ColorFilter == value ) return ;
208
208
context . colorFilter = m_ColorFilter = value ;
209
- ApplyContextToMaterial ( ) ;
209
+ SetMaterialDirty ( ) ;
210
210
}
211
211
}
212
212
@@ -221,7 +221,7 @@ public float colorIntensity
221
221
value = Mathf . Clamp ( value , 0 , 1 ) ;
222
222
if ( Mathf . Approximately ( m_ColorIntensity , value ) ) return ;
223
223
context . colorIntensity = m_ColorIntensity = value ;
224
- ApplyContextToMaterial ( ) ;
224
+ SetMaterialDirty ( ) ;
225
225
}
226
226
}
227
227
@@ -233,7 +233,7 @@ public Color color
233
233
m_Color . a = 1 ;
234
234
if ( m_Color == value ) return ;
235
235
context . color = m_Color = value ;
236
- ApplyContextToMaterial ( ) ;
236
+ SetMaterialDirty ( ) ;
237
237
}
238
238
}
239
239
@@ -244,7 +244,7 @@ public bool colorGlow
244
244
{
245
245
if ( m_ColorGlow == value ) return ;
246
246
context . colorGlow = m_ColorGlow = value ;
247
- ApplyContextToMaterial ( ) ;
247
+ SetMaterialDirty ( ) ;
248
248
}
249
249
}
250
250
@@ -259,7 +259,7 @@ public SamplingFilter samplingFilter
259
259
if ( m_SamplingFilter == value ) return ;
260
260
context . samplingFilter = m_SamplingFilter = value ;
261
261
SetVerticesDirty ( ) ;
262
- ApplyContextToMaterial ( ) ;
262
+ SetMaterialDirty ( ) ;
263
263
}
264
264
}
265
265
@@ -274,7 +274,7 @@ public float samplingIntensity
274
274
value = Mathf . Clamp ( value , 0 , 1 ) ;
275
275
if ( Mathf . Approximately ( m_SamplingIntensity , value ) ) return ;
276
276
context . samplingIntensity = m_SamplingIntensity = value ;
277
- ApplyContextToMaterial ( ) ;
277
+ SetMaterialDirty ( ) ;
278
278
}
279
279
}
280
280
@@ -286,7 +286,7 @@ public float samplingScale
286
286
value = Mathf . Clamp ( value , 0.01f , 100 ) ;
287
287
if ( Mathf . Approximately ( m_SamplingScale , value ) ) return ;
288
288
m_SamplingScale = value ;
289
- ApplyContextToMaterial ( ) ;
289
+ SetMaterialDirty ( ) ;
290
290
}
291
291
}
292
292
@@ -305,7 +305,7 @@ public TransitionFilter transitionFilter
305
305
if ( m_TransitionFilter == value ) return ;
306
306
context . transitionFilter = m_TransitionFilter = value ;
307
307
SetVerticesDirty ( ) ;
308
- ApplyContextToMaterial ( ) ;
308
+ SetMaterialDirty ( ) ;
309
309
}
310
310
}
311
311
@@ -320,7 +320,7 @@ public float transitionRate
320
320
value = Mathf . Clamp ( value , 0 , 1 ) ;
321
321
if ( Mathf . Approximately ( m_TransitionRate , value ) ) return ;
322
322
context . transitionRate = m_TransitionRate = value ;
323
- ApplyContextToMaterial ( ) ;
323
+ SetMaterialDirty ( ) ;
324
324
}
325
325
}
326
326
@@ -331,7 +331,7 @@ public bool transitionReverse
331
331
{
332
332
if ( m_TransitionReverse == value ) return ;
333
333
context . transitionReverse = m_TransitionReverse = value ;
334
- ApplyContextToMaterial ( ) ;
334
+ SetMaterialDirty ( ) ;
335
335
}
336
336
}
337
337
@@ -342,7 +342,7 @@ public Texture transitionTexture
342
342
{
343
343
if ( m_TransitionTex == value ) return ;
344
344
context . transitionTex = m_TransitionTex = value ;
345
- ApplyContextToMaterial ( ) ;
345
+ SetMaterialDirty ( ) ;
346
346
}
347
347
}
348
348
@@ -353,7 +353,7 @@ public Vector2 transitionTextureScale
353
353
{
354
354
if ( m_TransitionTexScale == value ) return ;
355
355
context . transitionTexScale = m_TransitionTexScale = value ;
356
- ApplyContextToMaterial ( ) ;
356
+ SetMaterialDirty ( ) ;
357
357
}
358
358
}
359
359
@@ -364,7 +364,7 @@ public Vector2 transitionTextureOffset
364
364
{
365
365
if ( m_TransitionTexOffset == value ) return ;
366
366
context . transitionTexOffset = m_TransitionTexOffset = value ;
367
- ApplyContextToMaterial ( ) ;
367
+ SetMaterialDirty ( ) ;
368
368
}
369
369
}
370
370
@@ -398,7 +398,7 @@ public float transitionWidth
398
398
value = Mathf . Clamp ( value , 0 , 1 ) ;
399
399
if ( Mathf . Approximately ( m_TransitionWidth , value ) ) return ;
400
400
context . transitionWidth = m_TransitionWidth = value ;
401
- ApplyContextToMaterial ( ) ;
401
+ SetMaterialDirty ( ) ;
402
402
}
403
403
}
404
404
@@ -410,7 +410,7 @@ public float transitionSoftness
410
410
value = Mathf . Clamp ( value , 0 , 1 ) ;
411
411
if ( Mathf . Approximately ( m_TransitionSoftness , value ) ) return ;
412
412
context . transitionSoftness = m_TransitionSoftness = value ;
413
- ApplyContextToMaterial ( ) ;
413
+ SetMaterialDirty ( ) ;
414
414
}
415
415
}
416
416
@@ -421,7 +421,7 @@ public ColorFilter transitionColorFilter
421
421
{
422
422
if ( m_TransitionColorFilter == value ) return ;
423
423
context . transitionColorFilter = m_TransitionColorFilter = value ;
424
- ApplyContextToMaterial ( ) ;
424
+ SetMaterialDirty ( ) ;
425
425
}
426
426
}
427
427
@@ -432,7 +432,7 @@ public Color transitionColor
432
432
{
433
433
if ( m_TransitionColor == value ) return ;
434
434
context . transitionColor = m_TransitionColor = value ;
435
- ApplyContextToMaterial ( ) ;
435
+ SetMaterialDirty ( ) ;
436
436
}
437
437
}
438
438
@@ -443,7 +443,7 @@ public bool transitionColorGlow
443
443
{
444
444
if ( m_TransitionColorGlow == value ) return ;
445
445
context . transitionColorGlow = m_TransitionColorGlow = value ;
446
- ApplyContextToMaterial ( ) ;
446
+ SetMaterialDirty ( ) ;
447
447
}
448
448
}
449
449
@@ -454,7 +454,7 @@ public TargetMode targetMode
454
454
{
455
455
if ( m_TargetMode == value ) return ;
456
456
context . targetMode = m_TargetMode = value ;
457
- ApplyContextToMaterial ( ) ;
457
+ SetMaterialDirty ( ) ;
458
458
}
459
459
}
460
460
@@ -465,7 +465,7 @@ public Color targetColor
465
465
{
466
466
if ( m_TargetColor == value ) return ;
467
467
context . targetColor = m_TargetColor = value ;
468
- ApplyContextToMaterial ( ) ;
468
+ SetMaterialDirty ( ) ;
469
469
}
470
470
}
471
471
@@ -477,7 +477,7 @@ public float targetRange
477
477
value = Mathf . Clamp ( value , 0 , 1 ) ;
478
478
if ( Mathf . Approximately ( m_TargetRange , value ) ) return ;
479
479
context . targetRange = m_TargetRange = value ;
480
- ApplyContextToMaterial ( ) ;
480
+ SetMaterialDirty ( ) ;
481
481
}
482
482
}
483
483
@@ -489,7 +489,7 @@ public float targetSoftness
489
489
value = Mathf . Clamp ( value , 0 , 1 ) ;
490
490
if ( Mathf . Approximately ( m_TargetSoftness , value ) ) return ;
491
491
context . targetSoftness = m_TargetSoftness = value ;
492
- ApplyContextToMaterial ( ) ;
492
+ SetMaterialDirty ( ) ;
493
493
}
494
494
}
495
495
@@ -502,7 +502,7 @@ public BlendType blendType
502
502
( m_SrcBlendMode , m_DstBlendMode ) = ( m_BlendType , m_SrcBlendMode , m_DstBlendMode ) . Convert ( ) ;
503
503
context . srcBlendMode = m_SrcBlendMode ;
504
504
context . dstBlendMode = m_DstBlendMode ;
505
- ApplyContextToMaterial ( ) ;
505
+ SetMaterialDirty ( ) ;
506
506
}
507
507
}
508
508
@@ -518,7 +518,7 @@ public BlendMode srcBlendMode
518
518
if ( m_SrcBlendMode == value ) return ;
519
519
context . srcBlendMode = m_SrcBlendMode = value ;
520
520
m_BlendType = ( m_SrcBlendMode , m_DstBlendMode ) . Convert ( ) ;
521
- ApplyContextToMaterial ( ) ;
521
+ SetMaterialDirty ( ) ;
522
522
}
523
523
}
524
524
@@ -534,7 +534,7 @@ public BlendMode dstBlendMode
534
534
if ( m_DstBlendMode == value ) return ;
535
535
context . dstBlendMode = m_DstBlendMode = value ;
536
536
m_BlendType = ( m_SrcBlendMode , m_DstBlendMode ) . Convert ( ) ;
537
- ApplyContextToMaterial ( ) ;
537
+ SetMaterialDirty ( ) ;
538
538
}
539
539
}
540
540
@@ -604,7 +604,7 @@ public float shadowBlurIntensity
604
604
value = Mathf . Clamp ( value , 0 , 1 ) ;
605
605
if ( Mathf . Approximately ( m_ShadowBlurIntensity , value ) ) return ;
606
606
context . shadowBlurIntensity = m_ShadowBlurIntensity = value ;
607
- ApplyContextToMaterial ( ) ;
607
+ SetMaterialDirty ( ) ;
608
608
}
609
609
}
610
610
@@ -615,7 +615,7 @@ public ColorFilter shadowColorFilter
615
615
{
616
616
if ( m_ShadowColorFilter == value ) return ;
617
617
context . shadowColorFilter = m_ShadowColorFilter = value ;
618
- ApplyContextToMaterial ( ) ;
618
+ SetMaterialDirty ( ) ;
619
619
}
620
620
}
621
621
@@ -626,7 +626,7 @@ public Color shadowColor
626
626
{
627
627
if ( m_ShadowColor == value ) return ;
628
628
context . shadowColor = m_ShadowColor = value ;
629
- ApplyContextToMaterial ( ) ;
629
+ SetMaterialDirty ( ) ;
630
630
}
631
631
}
632
632
@@ -637,7 +637,7 @@ public bool shadowGlow
637
637
{
638
638
if ( m_ShadowColorGlow == value ) return ;
639
639
context . shadowColorGlow = m_ShadowColorGlow = value ;
640
- ApplyContextToMaterial ( ) ;
640
+ SetMaterialDirty ( ) ;
641
641
}
642
642
}
643
643
@@ -726,13 +726,13 @@ protected override void OnEnable()
726
726
{
727
727
( m_SrcBlendMode , m_DstBlendMode ) = ( m_BlendType , m_SrcBlendMode , m_DstBlendMode ) . Convert ( ) ;
728
728
base . OnEnable ( ) ;
729
- ApplyContextToMaterial ( ) ;
729
+ SetMaterialDirty ( ) ;
730
730
}
731
731
732
732
protected override void OnDisable ( )
733
733
{
734
734
base . OnDisable ( ) ;
735
- ApplyContextToMaterial ( ) ;
735
+ SetMaterialDirty ( ) ;
736
736
}
737
737
738
738
protected override void OnDestroy ( )
@@ -960,7 +960,6 @@ public void LoadPreset(UIEffect preset)
960
960
m_GradationRotation = preset . m_GradationRotation ;
961
961
962
962
UpdateContext ( context ) ;
963
- ApplyContextToMaterial ( ) ;
964
963
SetVerticesDirty ( ) ;
965
964
SetMaterialDirty ( ) ;
966
965
}
@@ -1022,7 +1021,6 @@ internal void CopyFrom(UIEffectContext c)
1022
1021
m_GradationRotation = c . gradationRotation ;
1023
1022
1024
1023
UpdateContext ( context ) ;
1025
- ApplyContextToMaterial ( ) ;
1026
1024
SetVerticesDirty ( ) ;
1027
1025
SetMaterialDirty ( ) ;
1028
1026
}
0 commit comments