Skip to content

GSOC 26: custom vertex attributes in multi-material buildGeometry - #9077

Open
Nixxx19 wants to merge 2 commits into
processing:mainfrom
Nixxx19:buildgeometry-custom-attrs
Open

GSOC 26: custom vertex attributes in multi-material buildGeometry#9077
Nixxx19 wants to merge 2 commits into
processing:mainfrom
Nixxx19:buildgeometry-custom-attrs

Conversation

@Nixxx19

@Nixxx19 Nixxx19 commented Aug 12, 2026

Copy link
Copy Markdown
Member

follow up to #9063.

before, buildGeometry() only exposed the per-material parts when there were multiple materials and no custom per-vertex attributes. if you used vertexProperty(), the split was skipped and the geometry stayed whole, so you lost the material parts.

this makes custom vertex attributes work with the multi-material split:

  • the per-part builder now carries each draw's custom attributes into its part, reindexed per part, with the same missing-value padding the combined geometry already does
  • GeometryPart got a vertexProperty() method for it, and the prop factory is now shared with p5.Geometry instead of duplicated
  • dropped the gate in finish() that kept the geometry whole when custom attributes were present

added a test that builds a two material geometry with a custom attribute and checks each part carries its own values aligned to its vertices. the change is in the shared builder so it works in both webgl and webgpu.

@p5-bot

p5-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

Continuous Release

CDN link

Published Packages

Commit hash: cf3cab7

Previous deployments

This is an automated message.

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