-
Hi! I compressed normal to 2 * unsigned char ,and want to compress it with meshopt_encodeVertexBuffer further. However, I found that the function requires input vertex size of at least 4 bytes. Does that means I can't compress normal with size of 2 bytes? |
Beta Was this translation helpful? Give feedback.
Answered by
zeux
Dec 8, 2021
Replies: 1 comment
-
Right now you need to pad the data to 4 bytes, yeah. You can either do it with zeroes, or save a different attribute in the 2-byte gap like a tangent vector. This restriction is due to SIMD efficiency where arbitrary strides are very difficult to decode quickly. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jz0224
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now you need to pad the data to 4 bytes, yeah. You can either do it with zeroes, or save a different attribute in the 2-byte gap like a tangent vector. This restriction is due to SIMD efficiency where arbitrary strides are very difficult to decode quickly.