diff options
Diffstat (limited to 'drivers/gles3/storage/material_storage.cpp')
| -rw-r--r-- | drivers/gles3/storage/material_storage.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index 41c23fc3ec..a37eba3b15 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -586,11 +586,7 @@ void ShaderData::get_shader_uniform_list(List<PropertyInfo> *p_param_list) const if (E.value.scope != ShaderLanguage::ShaderNode::Uniform::SCOPE_LOCAL) { continue; } - if (E.value.texture_order >= 0) { - filtered_uniforms.push_back(Pair<StringName, int>(E.key, E.value.texture_order + 100000)); - } else { - filtered_uniforms.push_back(Pair<StringName, int>(E.key, E.value.order)); - } + filtered_uniforms.push_back(Pair<StringName, int>(E.key, E.value.prop_order)); } int uniform_count = filtered_uniforms.size(); sorter.sort(filtered_uniforms.ptr(), uniform_count); @@ -640,7 +636,7 @@ bool ShaderData::is_parameter_texture(const StringName &p_param) const { return false; } - return uniforms[p_param].texture_order >= 0; + return uniforms[p_param].is_texture(); } /////////////////////////////////////////////////////////////////////////// @@ -719,7 +715,7 @@ void MaterialData::update_uniform_buffer(const HashMap<StringName, ShaderLanguag bool uses_global_buffer = false; for (const KeyValue<StringName, ShaderLanguage::ShaderNode::Uniform> &E : p_uniforms) { - if (E.value.order < 0) { + if (E.value.is_texture()) { continue; // texture, does not go here } @@ -1277,6 +1273,7 @@ MaterialStorage::MaterialStorage() { actions.renames["CUSTOM2"] = "custom2_attrib"; actions.renames["CUSTOM3"] = "custom3_attrib"; actions.renames["OUTPUT_IS_SRGB"] = "SHADER_IS_SRGB"; + actions.renames["CLIP_SPACE_FAR"] = "SHADER_SPACE_FAR"; actions.renames["LIGHT_VERTEX"] = "light_vertex"; actions.renames["NODE_POSITION_WORLD"] = "model_matrix[3].xyz"; |
