You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Visual Shaders are back.
This commit is contained in:
@@ -3583,7 +3583,7 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Bui
|
||||
return OK;
|
||||
}
|
||||
|
||||
Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types) {
|
||||
Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Vector<StringName> &p_render_modes, const Set<String> &p_shader_types) {
|
||||
|
||||
Token tk = _get_token();
|
||||
|
||||
@@ -3642,7 +3642,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
|
||||
if (!p_render_modes.has(mode)) {
|
||||
if (p_render_modes.find(mode) == -1) {
|
||||
_set_error("Invalid render mode: '" + String(mode) + "'");
|
||||
return ERR_PARSE_ERROR;
|
||||
}
|
||||
@@ -4097,7 +4097,7 @@ String ShaderLanguage::get_shader_type(const String &p_code) {
|
||||
return String();
|
||||
}
|
||||
|
||||
Error ShaderLanguage::compile(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types) {
|
||||
Error ShaderLanguage::compile(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Vector<StringName> &p_render_modes, const Set<String> &p_shader_types) {
|
||||
|
||||
clear();
|
||||
|
||||
@@ -4114,7 +4114,7 @@ Error ShaderLanguage::compile(const String &p_code, const Map<StringName, Functi
|
||||
return OK;
|
||||
}
|
||||
|
||||
Error ShaderLanguage::complete(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Set<String> &p_render_modes, const Set<String> &p_shader_types, List<String> *r_options, String &r_call_hint) {
|
||||
Error ShaderLanguage::complete(const String &p_code, const Map<StringName, FunctionInfo> &p_functions, const Vector<StringName> &p_render_modes, const Set<String> &p_shader_types, List<String> *r_options, String &r_call_hint) {
|
||||
|
||||
clear();
|
||||
|
||||
@@ -4134,9 +4134,9 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Funct
|
||||
return ERR_PARSE_ERROR;
|
||||
} break;
|
||||
case COMPLETION_RENDER_MODE: {
|
||||
for (const Set<String>::Element *E = p_render_modes.front(); E; E = E->next()) {
|
||||
for (int i = 0; i < p_render_modes.size(); i++) {
|
||||
|
||||
r_options->push_back(E->get());
|
||||
r_options->push_back(p_render_modes[i]);
|
||||
}
|
||||
|
||||
return OK;
|
||||
|
||||
Reference in New Issue
Block a user