1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Style: Cleanup single-line blocks, semicolons, dead code

Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
This commit is contained in:
Rémi Verschelde
2022-02-16 13:56:32 +01:00
parent f5b9cbaff6
commit b8b4580448
137 changed files with 847 additions and 1269 deletions

View File

@@ -609,7 +609,6 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
r_gen_code.uniforms += uniform_defines[i];
}
#if 1
// add up
int offset = 0;
for (int i = 0; i < uniform_sizes.size(); i++) {
@@ -629,41 +628,6 @@ String ShaderCompiler::_dump_node_code(const SL::Node *p_node, int p_level, Gene
if (r_gen_code.uniform_total_size % 16 != 0) { //UBO sizes must be multiples of 16
r_gen_code.uniform_total_size += 16 - (r_gen_code.uniform_total_size % 16);
}
#else
// add up
for (int i = 0; i < uniform_sizes.size(); i++) {
if (i > 0) {
int align = uniform_sizes[i - 1] % uniform_alignments[i];
if (align != 0) {
uniform_sizes[i - 1] += uniform_alignments[i] - align;
}
uniform_sizes[i] = uniform_sizes[i] + uniform_sizes[i - 1];
}
}
//offset
r_gen_code.uniform_offsets.resize(uniform_sizes.size());
for (int i = 0; i < uniform_sizes.size(); i++) {
if (i > 0)
r_gen_code.uniform_offsets[i] = uniform_sizes[i - 1];
else
r_gen_code.uniform_offsets[i] = 0;
}
/*
for(Map<StringName,SL::ShaderNode::Uniform>::Element *E=pnode->uniforms.front();E;E=E->next()) {
if (SL::is_sampler_type(E->get().type)) {
continue;
}
}
*/
if (uniform_sizes.size()) {
r_gen_code.uniform_total_size = uniform_sizes[uniform_sizes.size() - 1];
} else {
r_gen_code.uniform_total_size = 0;
}
#endif
uint32_t index = p_default_actions.base_varying_index;