Bring a material's emission defines in line with output, and report whether
anything changed.
Shared by both wrappers because the invariant it maintains — at most one
emission define is ever set — is not local to either. The mesh fragment has three
emissions where its siblings have two, so leaving a stale flag behind is a live
failure mode rather than a theoretical one: an opaque → additive switch that
stranded LUXAR_MESH_ALPHA_CUTOUT would keep discarding fragments in a mode with
no cutout, and a mesh would appear to lose parts of itself at random. Implemented
twice, the unit test asserting "never both set" would only prove that both copies
happen to be right today.
Bring a material's emission defines in line with
output, and report whether anything changed.Shared by both wrappers because the invariant it maintains — at most one emission define is ever set — is not local to either. The mesh fragment has three emissions where its siblings have two, so leaving a stale flag behind is a live failure mode rather than a theoretical one: an
opaque → additiveswitch that strandedLUXAR_MESH_ALPHA_CUTOUTwould keep discarding fragments in a mode with no cutout, and a mesh would appear to lose parts of itself at random. Implemented twice, the unit test asserting "never both set" would only prove that both copies happen to be right today.