mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 13:49:54 +00:00
Merge pull request #113432 from TheDying0fLight/set-shader-path-before-compiling
Set shader path before compilation
This commit is contained in:
commit
5f12ada7a4
2 changed files with 2 additions and 1 deletions
|
|
@ -2281,6 +2281,7 @@ void MaterialStorage::shader_set_code(RID p_shader, const String &p_code) {
|
|||
}
|
||||
|
||||
if (shader->data) {
|
||||
shader->data->set_path_hint(shader->path_hint);
|
||||
shader->data->set_code(p_code);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -263,8 +263,8 @@ public:
|
|||
}
|
||||
|
||||
RSG::material_storage->shader_initialize(shader, false);
|
||||
RSG::material_storage->shader_set_code(shader, p_code);
|
||||
RSG::material_storage->shader_set_path_hint(shader, p_path_hint);
|
||||
RSG::material_storage->shader_set_code(shader, p_code);
|
||||
} else {
|
||||
command_queue.push(RSG::material_storage, &RendererMaterialStorage::shader_initialize, shader, false);
|
||||
command_queue.push(RSG::material_storage, &RendererMaterialStorage::shader_set_code, shader, p_code);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue