You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Merge pull request #94785 from Chaosus/shader_fix_samplers_order
Fix texture samplers to not being last in the property list
This commit is contained in:
@@ -8228,6 +8228,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;
|
||||
@@ -8782,6 +8783,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"));
|
||||
@@ -8790,6 +8792,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