Skip to content

Set matslot on the subdiv shape of a shape chain - #1116

Merged
howetuft merged 1 commit into
LuxCoreRender:mainfrom
howetuft:feature/subdiv-shared-envelope
Nov 11, 2026
Merged

howetuft merged 1 commit into
LuxCoreRender:mainfrom
howetuft:feature/subdiv-shared-envelope

Conversation

@howetuft

@howetuft howetuft commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Walk the shape chain via source links and set matslot on the subdiv shape itself (LuxCore only reads matslot there), so subdiv-in-chain materials split per material and share the single envelope subdivision run.

@howetuft
howetuft force-pushed the feature/subdiv-shared-envelope branch from d3e5b19 to 22d1b13 Compare November 11, 2026 23:12
…e per-submesh slot id in tri AOV layer 2

Ported from the feature branch onto current main (the rest of the branch
was already merged via LuxCoreRender#1114/LuxCoreRender#1115):

- set_matslot_on_subdiv_shape() walks a shape chain via the source links and
  sets matslot on the subdiv shape itself (the shape LuxCore reads matslot
  from), falling back to the final shape.
- Each submesh (material x island group) gets a unique slot id (group index
  + 1; +1 because the wireframe texture reads tri AOV layer 2 and skips an
  edge class when the value is 0), written to the tri AOV and passed as
  matslot to the subdiv shape, so the C++ subdiv envelope resplits per
  submesh instead of merging all islands of one material.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
@howetuft
howetuft force-pushed the feature/subdiv-shared-envelope branch from 22d1b13 to 740d8cc Compare November 11, 2026 23:20
@howetuft
howetuft merged commit 076daac into LuxCoreRender:main Nov 11, 2026
2 checks passed
@howetuft
howetuft deleted the feature/subdiv-shared-envelope branch November 11, 2026 23:21
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