Opacity Module
Types
| Type | Description |
|
Which instances of an instanced command a staging pass keeps. The per-instance tint alpha makes single instances semi-transparent while their neighbors stay opaque, so transparency is decided per instance: an instance is opaque when its tint alpha is 255 (instances past the colors array clamp to white, matching the staging contract). The filter applies at row-staging time — the kept instances' rows are written compacted, and the command's arrays and palette layout stay untouched. |
|
|
Which parts (draw units) of a skinned + instanced command a pass keeps: the parts whose
resolved material is opaque, the transparent ones, or all. Materials resolve per part
( |
Functions and values
| Function or value |
Description
|
Full Usage:
animatedModelPartOpacityMix (model, matOverride)
Parameters:
Model
matOverride : MaterialOverride voption
Returns: bool * bool * bool
|
One walk over the model's parts: (any part transparent, any part opaque, any part
invisible) under the override, resolved exactly as the forward pass resolves
materials. Transparent is
|
Full Usage:
anyTransparentInstanceColor (colors, count)
Parameters:
Color[] voption
count : int
Returns: bool
Modifiers: inline |
Count-aware whole-batch probe: true when any of the first count instances has a tint alpha below 255. The count matters — a colors array longer than the clamped instance count must not classify instances that never draw.
|
|
Sort key for a deferred instanced batch: squared distance from the camera to the average instance translation. The batch sorts as one unit; ordering between its instances stays submission order (the accepted batch-level approximation).
|
|
The per-instance split decision in one scan: how many of the first
count instances are transparent (tint alpha below 255), and the
squared distance from cameraPos to the transparent instances'
centroid — the deferred subset's sort key. Zero transparent instances returns
|
Full Usage:
isOpenGLBackend ()
Parameters:
unit
Returns: bool
Modifiers: inline |
True on the OpenGL backend, which has no vertex texture fetch — skinned + instanced draws fall back to per-instance skinned draws there (their transparency classification is per part/instance, not per batch).
|
Mibo