mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Fix several shader preprocessor include issues
This commit is contained in:
parent
518b9e5801
commit
0acaccebaf
6 changed files with 36 additions and 4 deletions
|
@ -674,6 +674,11 @@ void ShaderPreprocessor::process_include(Tokenizer *p_tokenizer) {
|
|||
return;
|
||||
}
|
||||
|
||||
path = path.simplify_path();
|
||||
if (path.is_relative_path()) {
|
||||
path = state->current_filename.get_base_dir().path_join(path);
|
||||
}
|
||||
|
||||
Ref<Resource> res = ResourceLoader::load(path);
|
||||
if (res.is_null()) {
|
||||
set_error(RTR("Shader include load failed. Does the shader include exist? Is there a cyclic dependency?"), line);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue