Skip to content

UVUnwrapper does not work with interleaved attributes, non float32 attributes #10

@gkjohnson

Description

@gkjohnson

The UVUnwrapper class passes the position etc attribute arrays into the xatlasjs addMesh function directly - however, if the geometry uses interleaved attributes then this array contains data for every attribute and will subsequently produce incorrect UVs. Likewise, even if a BufferAttribute is not interleaved it may still use arrays with smaller bit depth (eg 16 bit normals) which will be passed into xatlas, which looks like it requires Float32 buffers unless I'm misunderstanding.

It would be possible to unpack the buffers before generating so they can be used but throwing an error so the user knows the generated geometry is invalid would work, as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions