Skip to content

Fix Primitive.indices to use uint32 indices instead of float32#309

Open
DHasper wants to merge 1 commit into
mmatl:masterfrom
DHasper:fix-indices-dtype
Open

Fix Primitive.indices to use uint32 indices instead of float32#309
DHasper wants to merge 1 commit into
mmatl:masterfrom
DHasper:fix-indices-dtype

Conversation

@DHasper

@DHasper DHasper commented Jun 20, 2026

Copy link
Copy Markdown

Problem

The Primitive.indices setter cast face indices to dtype np.float32. A 32-bit float has a 24-bit mantissa, so it can only represent integers up to 2^24 = 16,777,216. Index values above that get rounded to the nearest representable float, corrupting mesh topology on large meshes.

Fix

Primitive.indices dtype: use uint32 instead of float32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant