2021-07-11 22:59:29 -05:00
|
|
|
// Decompiled with JetBrains decompiler
|
|
|
|
|
// Type: Microsoft.Iris.Render.BlendElement
|
|
|
|
|
// Assembly: UIX.RenderApi, Version=4.8.0.0, Culture=neutral, PublicKeyToken=ddd0da4d3e678217
|
|
|
|
|
// MVID: D47658B8-A8EA-43D6-8837-ECE823BFFFC1
|
|
|
|
|
// Assembly location: C:\Program Files\Zune\UIX.RenderApi.dll
|
|
|
|
|
|
|
|
|
|
using Microsoft.Iris.Render.Common;
|
|
|
|
|
using Microsoft.Iris.Render.Graphics;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.Iris.Render
|
|
|
|
|
{
|
2021-07-11 23:04:40 -05:00
|
|
|
public class BlendElement : EffectInput
|
2021-07-11 22:59:29 -05:00
|
|
|
{
|
2021-07-11 23:04:40 -05:00
|
|
|
private EffectInput m_effectInput1;
|
|
|
|
|
private EffectInput m_effectInput2;
|
|
|
|
|
private ColorOperation m_colorOperation;
|
|
|
|
|
private AlphaOperation m_alphaOperation;
|
2021-07-11 22:59:29 -05:00
|
|
|
|
2021-07-11 23:04:40 -05:00
|
|
|
public BlendElement(
|
|
|
|
|
EffectInput effectInput1,
|
|
|
|
|
EffectInput effectInput2,
|
|
|
|
|
ColorOperation colorOperation,
|
|
|
|
|
AlphaOperation alphaOperation)
|
|
|
|
|
: this()
|
|
|
|
|
{
|
|
|
|
|
Debug2.Validate(effectInput1 != null, typeof(ArgumentNullException), nameof(effectInput1));
|
|
|
|
|
Debug2.Validate(effectInput2 != null, typeof(ArgumentNullException), nameof(effectInput2));
|
|
|
|
|
this.m_effectInput1 = effectInput1;
|
|
|
|
|
this.m_effectInput2 = effectInput2;
|
|
|
|
|
this.m_colorOperation = colorOperation;
|
|
|
|
|
this.m_alphaOperation = alphaOperation;
|
|
|
|
|
}
|
2021-07-11 22:59:29 -05:00
|
|
|
|
2021-07-11 23:04:40 -05:00
|
|
|
public BlendElement(
|
|
|
|
|
EffectInput effectInput1,
|
|
|
|
|
EffectInput effectInput2,
|
|
|
|
|
ColorOperation colorOperation)
|
|
|
|
|
: this()
|
|
|
|
|
{
|
|
|
|
|
Debug2.Validate(effectInput1 != null, typeof(ArgumentNullException), nameof(effectInput1));
|
|
|
|
|
Debug2.Validate(effectInput2 != null, typeof(ArgumentNullException), nameof(effectInput2));
|
|
|
|
|
this.m_effectInput1 = effectInput1;
|
|
|
|
|
this.m_effectInput2 = effectInput2;
|
|
|
|
|
this.m_colorOperation = colorOperation;
|
|
|
|
|
}
|
2021-07-11 22:59:29 -05:00
|
|
|
|
2021-07-11 23:04:40 -05:00
|
|
|
public BlendElement()
|
|
|
|
|
{
|
|
|
|
|
this.m_stName = "Blend";
|
|
|
|
|
this.m_typeInput = EffectInputType.Blend;
|
|
|
|
|
this.m_alphaOperation = AlphaOperation.Source1;
|
|
|
|
|
}
|
2021-07-11 22:59:29 -05:00
|
|
|
|
2021-07-11 23:04:40 -05:00
|
|
|
public EffectInput Input1
|
|
|
|
|
{
|
|
|
|
|
get => this.m_effectInput1;
|
|
|
|
|
set => this.m_effectInput1 = value;
|
|
|
|
|
}
|
2021-07-11 22:59:29 -05:00
|
|
|
|
2021-07-11 23:04:40 -05:00
|
|
|
public EffectInput Input2
|
|
|
|
|
{
|
|
|
|
|
get => this.m_effectInput2;
|
|
|
|
|
set => this.m_effectInput2 = value;
|
|
|
|
|
}
|
2021-07-11 22:59:29 -05:00
|
|
|
|
2021-07-11 23:04:40 -05:00
|
|
|
public ColorOperation ColorOperation
|
|
|
|
|
{
|
|
|
|
|
get => this.m_colorOperation;
|
|
|
|
|
set => this.m_colorOperation = value;
|
|
|
|
|
}
|
2021-07-11 22:59:29 -05:00
|
|
|
|
2021-07-11 23:04:40 -05:00
|
|
|
public AlphaOperation AlphaOperation
|
|
|
|
|
{
|
|
|
|
|
get => this.m_alphaOperation;
|
|
|
|
|
set => this.m_alphaOperation = value;
|
|
|
|
|
}
|
2021-07-11 22:59:29 -05:00
|
|
|
|
2021-07-11 23:04:40 -05:00
|
|
|
internal override void AddCacheKey(ByteBuilder cacheKey)
|
|
|
|
|
{
|
|
|
|
|
base.AddCacheKey(cacheKey);
|
2021-07-11 23:07:04 -05:00
|
|
|
this.GenerateClassCacheKey(2, (byte)this.m_colorOperation, cacheKey);
|
|
|
|
|
this.GenerateClassCacheKey(2, (byte)this.m_alphaOperation, cacheKey);
|
2021-07-11 23:04:40 -05:00
|
|
|
this.m_effectInput1.AddCacheKey(cacheKey);
|
|
|
|
|
this.m_effectInput2.AddCacheKey(cacheKey);
|
|
|
|
|
}
|
2021-07-11 22:59:29 -05:00
|
|
|
|
2021-07-11 23:04:40 -05:00
|
|
|
internal override int PreProcessProperties(
|
|
|
|
|
Map<string, EffectProperty> dictionary,
|
|
|
|
|
ref byte nNextUniqueID)
|
|
|
|
|
{
|
|
|
|
|
return base.PreProcessProperties(dictionary, ref nNextUniqueID) + 3 + 3 + this.m_effectInput1.PreProcessProperties(dictionary, ref nNextUniqueID) + this.m_effectInput2.PreProcessProperties(dictionary, ref nNextUniqueID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal override bool Process(Map<string, EffectProperty> dictProperties) => this.m_effectInput1.Process(dictProperties) && this.m_effectInput2.Process(dictProperties);
|
|
|
|
|
}
|
2021-07-11 22:59:29 -05:00
|
|
|
}
|