diff options
author | jadeharley2 <tim29092@gmail.com> | 2024-11-11 15:31:43 +0300 |
---|---|---|
committer | jadeharley2 <tim29092@gmail.com> | 2024-11-11 15:31:43 +0300 |
commit | a4d1d36c85dfdc6f281380ca9557acf0d7e76ce2 (patch) | |
tree | 32f31355821fc74b72b45c4398878c48973beecb /scene/resources | |
parent | 0f5f3bc9546b46b2029fc8896dc859697f1eab97 (diff) | |
download | redot-engine-a4d1d36c85dfdc6f281380ca9557acf0d7e76ce2.tar.gz |
Fix inability to set TextureLayeredRD as TEXTURE_TYPE_CUBE or TEXTURE_TYPE_CUBE_ARRAY
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/texture_rd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/texture_rd.cpp b/scene/resources/texture_rd.cpp index 531dbcbe7e..8e7eeb0ff4 100644 --- a/scene/resources/texture_rd.cpp +++ b/scene/resources/texture_rd.cpp @@ -197,7 +197,7 @@ void TextureLayeredRD::_set_texture_rd_rid(RID p_texture_rd_rid) { RS::TextureLayeredType rs_layer_type; RD::TextureFormat tf = RD::get_singleton()->texture_get_format(p_texture_rd_rid); - ERR_FAIL_COND(tf.texture_type != RD::TEXTURE_TYPE_2D_ARRAY); + ERR_FAIL_COND(tf.texture_type != RD::TEXTURE_TYPE_2D_ARRAY && tf.texture_type != RD::TEXTURE_TYPE_CUBE && tf.texture_type != RD::TEXTURE_TYPE_CUBE_ARRAY); ERR_FAIL_COND(tf.depth > 1); switch (layer_type) { case LAYERED_TYPE_2D_ARRAY: { |