Survivalcraft API 1.8.2.3 v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
BlendState.cs
浏览该文件的文档.
1namespace Engine.Graphics {
2 public class BlendState : LockOnFirstUse {
4
6
8
10
12
14
16
17 public static readonly BlendState Opaque = new() { IsLocked = true };
18
19 public static readonly BlendState Additive = new() {
20 ColorSourceBlend = Blend.SourceAlpha,
22 AlphaSourceBlend = Blend.SourceAlpha,
24 IsLocked = true
25 };
26
27 public static readonly BlendState AlphaBlend = new() {
29 ColorDestinationBlend = Blend.InverseSourceAlpha,
31 AlphaDestinationBlend = Blend.InverseSourceAlpha,
32 IsLocked = true
33 };
34
35 public static readonly BlendState NonPremultiplied = new() {
36 ColorSourceBlend = Blend.SourceAlpha,
37 ColorDestinationBlend = Blend.InverseSourceAlpha,
38 AlphaSourceBlend = Blend.SourceAlpha,
39 AlphaDestinationBlend = Blend.InverseSourceAlpha,
40 IsLocked = true
41 };
42
45 set {
48 }
49 }
50
52 get => m_alphaSourceBlend;
53 set {
55 m_alphaSourceBlend = value;
56 }
57 }
58
61 set {
64 }
65 }
66
69 set {
72 }
73 }
74
76 get => m_colorSourceBlend;
77 set {
79 m_colorSourceBlend = value;
80 }
81 }
82
85 set {
88 }
89 }
90
92 get => m_blendFactor;
93 set {
95 m_blendFactor = value;
96 }
97 }
98
99 public bool BaseEquals(object obj) {
100 if (obj is not BlendState blendState) {
101 return false;
102 }
103 return m_colorSourceBlend == blendState.m_colorSourceBlend
104 && m_colorDestinationBlend == blendState.m_colorDestinationBlend
105 && m_alphaSourceBlend == blendState.m_alphaSourceBlend
106 && m_alphaDestinationBlend == blendState.m_alphaDestinationBlend;
107 }
108 }
109}
static readonly BlendState Opaque
static readonly BlendState Additive
static readonly BlendState AlphaBlend
static readonly BlendState NonPremultiplied
static readonly Vector4 Zero