mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Fix texture samplers to not being last in the property list
This commit is contained in:
parent
88d9325065
commit
e41048e16e
6 changed files with 18 additions and 21 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue