You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Implement async shader compilation plus caching for GL ES 3
Async. compilation via ubershader is currently available in the scene and particles shaders only. Bonus: - Use `#if defined()` syntax for not true conditionals, so they don't unnecessarily take a bit in the version flagset. - Remove unused `ENABLE_CLIP_ALPHA` from scene shader. - Remove unused `PARTICLES_COPY` from the particles shader. - Remove unused uniform related code. - Shader language/compiler: use ordered hash maps for deterministic code generation (needed for caching).
This commit is contained in:
@@ -6893,11 +6893,11 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Funct
|
||||
}
|
||||
}
|
||||
|
||||
for (const Map<StringName, ShaderNode::Varying>::Element *E = shader->varyings.front(); E; E = E->next()) {
|
||||
matches.insert(E->key(), ScriptCodeCompletionOption::KIND_VARIABLE);
|
||||
for (OrderedHashMap<StringName, ShaderNode::Varying>::Element E = shader->varyings.front(); E; E = E.next()) {
|
||||
matches.insert(E.key(), ScriptCodeCompletionOption::KIND_VARIABLE);
|
||||
}
|
||||
for (const Map<StringName, ShaderNode::Uniform>::Element *E = shader->uniforms.front(); E; E = E->next()) {
|
||||
matches.insert(E->key(), ScriptCodeCompletionOption::KIND_MEMBER);
|
||||
for (OrderedHashMap<StringName, ShaderNode::Uniform>::Element E = shader->uniforms.front(); E; E = E.next()) {
|
||||
matches.insert(E.key(), ScriptCodeCompletionOption::KIND_MEMBER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user