Merge pull request #86668 from KoBeWi/most_shader_path

Automatically add path to built-in shaders
This commit is contained in:
Rémi Verschelde 2024-04-26 15:13:26 +02:00
commit e7fa697808
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -243,7 +243,12 @@ void fog() {
emit_signal(SNAME("shader_include_created"), shader_inc);
} else {
if (!is_built_in) {
if (is_built_in) {
Node *edited_scene = get_tree()->get_edited_scene_root();
if (likely(edited_scene)) {
shader->set_path(edited_scene->get_scene_file_path() + "::");
}
} else {
String lpath = ProjectSettings::get_singleton()->localize_path(file_path->get_text());
shader->set_path(lpath);