Merge pull request #45859 from Kayomn/master
Accomodate blend shape ranges of -1 to +1 for Vulkan
This commit is contained in:
commit
e9a25b8552
2 changed files with 2 additions and 2 deletions
|
@ -95,7 +95,7 @@ void MeshInstance3D::_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::FLOAT, E->get(), PROPERTY_HINT_RANGE, "0,1,0.00001"));
|
p_list->push_back(PropertyInfo(Variant::FLOAT, E->get(), PROPERTY_HINT_RANGE, "-1,1,0.00001"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mesh.is_valid()) {
|
if (mesh.is_valid()) {
|
||||||
|
|
|
@ -100,7 +100,7 @@ void main() {
|
||||||
|
|
||||||
for (uint i = 0; i < params.blend_shape_count; i++) {
|
for (uint i = 0; i < params.blend_shape_count; i++) {
|
||||||
float w = blend_shape_weights.data[i];
|
float w = blend_shape_weights.data[i];
|
||||||
if (w > 0.0001) {
|
if ((w < 0.0001) || (w > 0.0001)) {
|
||||||
uint base_offset = (params.vertex_count * i + index) * params.vertex_stride;
|
uint base_offset = (params.vertex_count * i + index) * params.vertex_stride;
|
||||||
|
|
||||||
blend_vertex += uintBitsToFloat(uvec3(src_blend_shapes.data[base_offset + 0], src_blend_shapes.data[base_offset + 1], src_blend_shapes.data[base_offset + 2])) * w;
|
blend_vertex += uintBitsToFloat(uvec3(src_blend_shapes.data[base_offset + 0], src_blend_shapes.data[base_offset + 1], src_blend_shapes.data[base_offset + 2])) * w;
|
||||||
|
|
Loading…
Reference in a new issue