mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-18 15:27:17 +01:00
Backported: 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.
- lawnjelly
c6a428b3d6
This commit is contained in:
parent
33ab320721
commit
30d7a3c5a7
@ -2120,6 +2120,11 @@ static PoolVector<uint8_t> _unpack_half_floats(const PoolVector<uint8_t> &array,
|
|||||||
if (!(p_format & RS::ARRAY_COMPRESS_TANGENT && p_format & RS::ARRAY_COMPRESS_NORMAL)) {
|
if (!(p_format & RS::ARRAY_COMPRESS_TANGENT && p_format & RS::ARRAY_COMPRESS_NORMAL)) {
|
||||||
src_size[RS::ARRAY_NORMAL] = 8;
|
src_size[RS::ARRAY_NORMAL] = 8;
|
||||||
dst_size[RS::ARRAY_NORMAL] = 8;
|
dst_size[RS::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;
|
src_size[i] = 0;
|
||||||
dst_size[i] = 0;
|
dst_size[i] = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user