summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorbitsawer <sawerduster@gmail.com>2023-08-15 14:03:37 +0300
committerbitsawer <sawerduster@gmail.com>2023-08-15 14:18:26 +0300
commit41def3740acb57c163b803414466c9df9bf3d75e (patch)
tree0369aa2a742ed2dc3227d4d468a73034809b69a9 /drivers
parentc495eb5102278a110c14bbffbf833ed436d1594d (diff)
downloadredot-engine-41def3740acb57c163b803414466c9df9bf3d75e.tar.gz
Fix global shader uniform texture loading
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/storage/material_storage.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp
index aa6319f0ef..a36004209b 100644
--- a/drivers/gles3/storage/material_storage.cpp
+++ b/drivers/gles3/storage/material_storage.cpp
@@ -1957,14 +1957,16 @@ void MaterialStorage::global_shader_parameters_load_settings(bool p_load_texture
if (gvtype >= RS::GLOBAL_VAR_TYPE_SAMPLER2D) {
//textire
if (!p_load_textures) {
- value = RID();
continue;
}
String path = value;
- Ref<Resource> resource = ResourceLoader::load(path);
- ERR_CONTINUE(resource.is_null());
- value = resource;
+ if (path.is_empty()) {
+ value = RID();
+ } else {
+ Ref<Resource> resource = ResourceLoader::load(path);
+ value = resource;
+ }
}
if (global_shader_uniforms.variables.has(name)) {