Closed appgurueu closed 5 months ago
Why not allow implementations to "default initialize" the accessor in these cases?
Accessors are generally not aware of their usage. For example, a floating-point VEC4 accessor may be used for:
TANGENT
vertex attributeCOLOR_n
vertex attributeWEIGHTS_n
vertex attributerotation
animation data"Default initialize" would require deferring data initialization until the effective accessor usage is known and duplicating the accessor if it's used more than once and its usages imply different default values.
Thanks, good point.
The specification states the following on
accessor.bufferView
:However, this requirement is not useful in the case that the accessor must not contain zeros.
For example in the cases of quaternions or inverse bind matrices, an all zero quaternion or all zero inverse bind matrix would be invalid. It is more useful to "default-initialize" quaternions to identity quaternions and inverse bind matrices to identity matrices.
Hence, a zero-initialized sparse accessor for these properties would not be feasible; it would have to override all of the elements.
Why not allow implementations to "default initialize" the accessor in these cases? (I am working on a C++ implementation which will naturally fill the accessor with identity quaternions / matrices.)