浏览代码

Merge pull request #57875 from ZuBsPaCe/shader-instance-qualifier-format-string

Yuri Roubinsky 3 年之前
父节点
当前提交
5d536f06c2
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      servers/rendering/shader_language.cpp

+ 2 - 2
servers/rendering/shader_language.cpp

@@ -7871,7 +7871,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
 
 
 					if (is_sampler_type(type)) {
 					if (is_sampler_type(type)) {
 						if (uniform_scope == ShaderNode::Uniform::SCOPE_INSTANCE) {
 						if (uniform_scope == ShaderNode::Uniform::SCOPE_INSTANCE) {
-							_set_error(vformat(RTR("Uniforms with '%s' qualifiers can't be of sampler type.", "instance")));
+							_set_error(vformat(RTR("The '%s' qualifier is not supported for sampler types."), "SCOPE_INSTANCE"));
 							return ERR_PARSE_ERROR;
 							return ERR_PARSE_ERROR;
 						}
 						}
 						uniform2.texture_order = texture_uniforms++;
 						uniform2.texture_order = texture_uniforms++;
@@ -7887,7 +7887,7 @@ Error ShaderLanguage::_parse_shader(const Map<StringName, FunctionInfo> &p_funct
 						}
 						}
 					} else {
 					} else {
 						if (uniform_scope == ShaderNode::Uniform::SCOPE_INSTANCE && (type == TYPE_MAT2 || type == TYPE_MAT3 || type == TYPE_MAT4)) {
 						if (uniform_scope == ShaderNode::Uniform::SCOPE_INSTANCE && (type == TYPE_MAT2 || type == TYPE_MAT3 || type == TYPE_MAT4)) {
-							_set_error(vformat(RTR("Uniforms with '%s' qualifier can't be of matrix type.", "instance")));
+							_set_error(vformat(RTR("The '%s' qualifier is not supported for matrix types."), "SCOPE_INSTANCE"));
 							return ERR_PARSE_ERROR;
 							return ERR_PARSE_ERROR;
 						}
 						}
 						uniform2.texture_order = -1;
 						uniform2.texture_order = -1;