Fix texture samplers to not being last in the property list
This commit is contained in:
@ -8202,6 +8202,7 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f
|
||||
int texture_binding = 0;
|
||||
int uniforms = 0;
|
||||
int instance_index = 0;
|
||||
int prop_index = 0;
|
||||
#ifdef DEBUG_ENABLED
|
||||
uint64_t uniform_buffer_size = 0;
|
||||
uint64_t max_uniform_buffer_size = 0;
|
||||
@ -8756,6 +8757,7 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f
|
||||
++texture_binding;
|
||||
}
|
||||
uniform.order = -1;
|
||||
uniform.prop_order = prop_index++;
|
||||
} else {
|
||||
if (uniform_scope == ShaderNode::Uniform::SCOPE_INSTANCE && (type == TYPE_MAT2 || type == TYPE_MAT3 || type == TYPE_MAT4)) {
|
||||
_set_error(vformat(RTR("The '%s' qualifier is not supported for matrix types."), "SCOPE_INSTANCE"));
|
||||
@ -8764,6 +8766,7 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f
|
||||
uniform.texture_order = -1;
|
||||
if (uniform_scope != ShaderNode::Uniform::SCOPE_INSTANCE) {
|
||||
uniform.order = uniforms++;
|
||||
uniform.prop_order = prop_index++;
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (check_device_limit_warnings) {
|
||||
if (uniform.array_size > 0) {
|
||||
|
||||
Reference in New Issue
Block a user