소스 검색

Merge pull request #30611 from Chaosus/local_array_init_fix

Allows to use non-constants in the local shader array initializer
Yuri Roubinsky 6 년 전
부모
커밋
6b9d502195
1개의 변경된 파일0개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 4
      servers/visual/shader_language.cpp

+ 0 - 4
servers/visual/shader_language.cpp

@@ -3958,10 +3958,6 @@ Error ShaderLanguage::_parse_block(BlockNode *p_block, const Map<StringName, Bui
 								if (!n) {
 									return ERR_PARSE_ERROR;
 								}
-								if (n->type != Node::TYPE_CONSTANT) {
-									_set_error("Expected constant expression in the array declaration");
-									return ERR_PARSE_ERROR;
-								}
 
 								if (var.type != n->get_datatype()) {
 									_set_error("Invalid assignment of '" + get_datatype_name(n->get_datatype()) + "' to '" + get_datatype_name(var.type) + "'");