Merge pull request #45837 from Kayomn/3.2

Accomodate blend shape ranges of -1 to +1 for GLES
This commit is contained in:
Rémi Verschelde 2021-02-12 09:28:19 +01:00 committed by GitHub
commit e71510097d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -4476,8 +4476,10 @@ void RasterizerStorageGLES3::mesh_render_blend_shapes(Surface *s, const float *p
for (int ti = 0; ti < mtc; ti++) { for (int ti = 0; ti < mtc; ti++) {
float weight = p_weights[ti]; float weight = p_weights[ti];
if (weight < 0.00001) //not bother with this one if (Math::is_zero_approx(weight)) {
//not bother with this one
continue; continue;
}
glBindVertexArray(s->blend_shapes[ti].array_id); glBindVertexArray(s->blend_shapes[ti].array_id);
glBindBuffer(GL_ARRAY_BUFFER, resources.transform_feedback_buffers[0]); glBindBuffer(GL_ARRAY_BUFFER, resources.transform_feedback_buffers[0]);

View file

@ -98,7 +98,7 @@ void MeshInstance::_get_property_list(List<PropertyInfo> *p_list) const {
ls.sort(); ls.sort();
for (List<String>::Element *E = ls.front(); E; E = E->next()) { for (List<String>::Element *E = ls.front(); E; E = E->next()) {
p_list->push_back(PropertyInfo(Variant::REAL, E->get(), PROPERTY_HINT_RANGE, "0,1,0.00001")); p_list->push_back(PropertyInfo(Variant::REAL, E->get(), PROPERTY_HINT_RANGE, "-1,1,0.00001"));
} }
if (mesh.is_valid()) { if (mesh.is_valid()) {