Skip to content

Question regarding accessor's byte offset when sparse data is available #2477

Open
@gboisse

Description

@gboisse

I have been trying to figure that one out from the specifications but I can't seem to quite confirm the expected behaviour here for a glTF importer.

Currently, I apply the byte offset property from the accessor to both the "regular" data and the sparse data, like so:

buffer.m_data = gltfBuffer.data.data() + gltfBufferView.byteOffset + gltfAccessor.byteOffset;
buffer.m_sparseData = gltfSparseBuffer.data.data() + gltfSparseBufferView.byteOffset + gltfAccessor.byteOffset;

Is this correct? or is the byte offset property only meant to be applied to the "regular" data pointer?
I couldn't find any glTF sample file so far that'd have non-zero byte offsets while using sparse accessors.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions