GLES2 fix octahedral half float unpacking

The strides in _unpack_half_floats() were incorrectly calculated in the case where octahedral normals and tangents were in use.

(cherry picked from commit c6a428b3d6)
This commit is contained in:
lawnjelly 2023-01-16 11:55:06 +00:00 committed by Rémi Verschelde
parent 4f1641e569
commit 672ad5aa94
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -2120,6 +2120,11 @@ static PoolVector<uint8_t> _unpack_half_floats(const PoolVector<uint8_t> &array,
if (!(p_format & VS::ARRAY_COMPRESS_TANGENT && p_format & VS::ARRAY_COMPRESS_NORMAL)) {
src_size[VS::ARRAY_NORMAL] = 8;
dst_size[VS::ARRAY_NORMAL] = 8;
// These must be incremented manually,
// as we are modifying a previous attribute size.
src_stride += 4;
dst_stride += 4;
}
src_size[i] = 0;
dst_size[i] = 0;