You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Fix shader preprocessor include resource check
This commit is contained in:
@@ -679,6 +679,11 @@ void ShaderPreprocessor::process_include(Tokenizer *p_tokenizer) {
|
|||||||
path = state->current_filename.get_base_dir().path_join(path);
|
path = state->current_filename.get_base_dir().path_join(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ResourceLoader::exists(path)) {
|
||||||
|
set_error(RTR("Shader include file does not exist: ") + path, line);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Ref<Resource> res = ResourceLoader::load(path);
|
Ref<Resource> res = ResourceLoader::load(path);
|
||||||
if (res.is_null()) {
|
if (res.is_null()) {
|
||||||
set_error(RTR("Shader include load failed. Does the shader include exist? Is there a cyclic dependency?"), line);
|
set_error(RTR("Shader include load failed. Does the shader include exist? Is there a cyclic dependency?"), line);
|
||||||
|
|||||||
Reference in New Issue
Block a user