You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #107475 from beicause/fix-global-shader-texture-uniform
Fix global shader texture uniform
This commit is contained in:
@@ -872,10 +872,14 @@ void MaterialData::update_textures(const HashMap<StringName, Variant> &p_paramet
|
||||
E->value = global_textures_pass;
|
||||
}
|
||||
|
||||
if (v->override.get_type() == Variant::RID && ((RID)v->override).is_valid()) {
|
||||
textures.push_back(v->override);
|
||||
} else if (v->value.get_type() == Variant::RID && ((RID)v->value).is_valid()) {
|
||||
textures.push_back(v->value);
|
||||
RID override_rid = v->override;
|
||||
if (override_rid.is_valid()) {
|
||||
textures.push_back(override_rid);
|
||||
} else {
|
||||
RID value_rid = v->value;
|
||||
if (value_rid.is_valid()) {
|
||||
textures.push_back(value_rid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -906,10 +906,14 @@ void MaterialStorage::MaterialData::update_textures(const HashMap<StringName, Va
|
||||
E->value = global_textures_pass;
|
||||
}
|
||||
|
||||
if (v->override.get_type() == Variant::RID && ((RID)v->override).is_valid()) {
|
||||
textures.push_back(v->override);
|
||||
} else if (v->value.get_type() == Variant::RID && ((RID)v->value).is_valid()) {
|
||||
textures.push_back(v->value);
|
||||
RID override_rid = v->override;
|
||||
if (override_rid.is_valid()) {
|
||||
textures.push_back(override_rid);
|
||||
} else {
|
||||
RID value_rid = v->value;
|
||||
if (value_rid.is_valid()) {
|
||||
textures.push_back(value_rid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user