@@ -45,13 +45,6 @@ Shader::VertexBinding& Shader::VertexBinding::AddFloatVec2Attribute()
45
45
return *this ;
46
46
}
47
47
48
- Shader::VertexBinding& Shader::VertexBinding::AddU32Attribute ()
49
- {
50
- attributes.Append ({stride, Utils::VertexAttributeType::VERTEX_UINT_32, inputRate});
51
- stride += sizeof (uint32_t );
52
- return *this ;
53
- }
54
-
55
48
Shader::VertexBinding& Shader::VertexBinding::AddMat4Attribute ()
56
49
{
57
50
return AddFloatVec4Attribute ()
@@ -60,16 +53,6 @@ Shader::VertexBinding& Shader::VertexBinding::AddMat4Attribute()
60
53
.AddFloatVec4Attribute ();
61
54
}
62
55
63
- Shader::VertexBinding& Shader::VertexBinding::AddMat2Attribute ()
64
- {
65
- return AddFloatVec4Attribute ().AddFloatVec4Attribute ();
66
- }
67
-
68
- Shader::VertexBinding& Shader::VertexBinding::AddMat3Attribute ()
69
- {
70
- return AddFloatVec4Attribute ().AddFloatVec4Attribute ().AddFloatVec4Attribute ();
71
- }
72
-
73
56
Shader::Builder& Shader::Builder::WithGlobalData3DUniform (uint32_t set)
74
57
{
75
58
return WithUniform<Siege::Renderer3D::GlobalData>(" globalData" , set);
@@ -138,12 +121,6 @@ Shader::Builder& Shader::Builder::WithVertexBinding(const Shader::VertexBinding&
138
121
return *this ;
139
122
}
140
123
141
- Shader::Builder& Shader::Builder::WithDepthWrite (bool state)
142
- {
143
- isWritingDepth = state;
144
- return *this ;
145
- }
146
-
147
124
Shader Shader::Builder::Build () const
148
125
{
149
126
return Shader (filePath,
@@ -154,8 +131,7 @@ Shader Shader::Builder::Build() const
154
131
defaultTextureInfo,
155
132
pushConstant,
156
133
totalUniformSize,
157
- attributeCount,
158
- isWritingDepth);
134
+ attributeCount);
159
135
}
160
136
161
137
Shader::Shader (const Shader& other) :
@@ -165,8 +141,7 @@ Shader::Shader(const Shader& other) :
165
141
vertexBindings {other.vertexBindings },
166
142
defaultTextureInfo {other.defaultTextureInfo },
167
143
pushConstant {other.pushConstant },
168
- totalUniformSize {other.totalUniformSize },
169
- isWritingDepth {other.isWritingDepth }
144
+ totalUniformSize {other.totalUniformSize }
170
145
{
171
146
CreateShaderModule ();
172
147
}
@@ -179,8 +154,7 @@ Shader::Shader(const String& filePath,
179
154
Texture2D::Info tex2DInfo,
180
155
PushConstant pushConstant,
181
156
size_t totalSize,
182
- uint32_t totalVertexAttributes,
183
- bool isWritingDepth) :
157
+ uint32_t totalVertexAttributes) :
184
158
filePath {filePath},
185
159
type {type},
186
160
expectedTopology {expectedTopology},
@@ -189,8 +163,7 @@ Shader::Shader(const String& filePath,
189
163
defaultTextureInfo {tex2DInfo},
190
164
pushConstant {pushConstant},
191
165
totalUniformSize {totalSize},
192
- totalVertexAttributeCount {totalVertexAttributes},
193
- isWritingDepth {isWritingDepth}
166
+ totalVertexAttributeCount {totalVertexAttributes}
194
167
{
195
168
CreateShaderModule ();
196
169
}
@@ -249,7 +222,6 @@ void Shader::Swap(Shader& other)
249
222
auto tmpExpectedTopology = expectedTopology;
250
223
auto tmpDefaultTexture2DInfo = defaultTextureInfo;
251
224
auto tmpPushConstant = pushConstant;
252
- auto tmpIsWritingDepth = isWritingDepth;
253
225
254
226
filePath = other.filePath ;
255
227
type = other.type ;
@@ -261,7 +233,6 @@ void Shader::Swap(Shader& other)
261
233
expectedTopology = other.expectedTopology ;
262
234
defaultTextureInfo = other.defaultTextureInfo ;
263
235
pushConstant = other.pushConstant ;
264
- isWritingDepth = other.isWritingDepth ;
265
236
266
237
other.filePath = tmpFilePath;
267
238
other.type = tmpShaderType;
@@ -273,6 +244,5 @@ void Shader::Swap(Shader& other)
273
244
other.expectedTopology = tmpExpectedTopology;
274
245
other.defaultTextureInfo = tmpDefaultTexture2DInfo;
275
246
other.pushConstant = tmpPushConstant;
276
- other.isWritingDepth = tmpIsWritingDepth;
277
247
}
278
248
} // namespace Siege::Vulkan
0 commit comments