Enum FaceColoringMode
Selects how a PaletteFaceColorResolver maps a shape's faces onto the entries of a ColorPalette. Consumed by ScyllaShapeBase3D when per-face vertex coloring is enabled.
Namespace: Scylla.Core.Util.Geom
Assembly: ScyllaCore.dll
Syntax
public enum FaceColoringMode
Remarks
This enum is stored as a serialized field on ScyllaShapeBase3D and drives which IFaceColorResolver implementation is created at mesh-build time. When the value is None, no resolver is created and the shape emits no vertex color channel. All other values construct a PaletteFaceColorResolver with the corresponding algorithm.
Shape-specific coloring mode enums (such as BarrelColoringMode,
CrateColoringMode, etc.) control how a shape's own logical face groups map onto
resolver face indices, and are orthogonal to this enum - FaceColoringMode controls
the color assignment algorithm, while the shape coloring mode controls the face grouping.
Fields
| Name | Description |
|---|---|
| Cycle | Each face takes the palette entry at |
| GradientByY | Each face is colored by sampling the palette along its center's vertical position,
producing a bottom-to-top gradient across the shape. Adjacent palette entries are
blended for a smooth ramp. The Y range used for normalization is supplied to
PaletteFaceColorResolver at construction time via its |
| Hash | Each face takes a pseudo-random palette entry derived from a hash of its face index and a seed. Distributes colors less regularly than Cycle while staying deterministic for a given seed. The seed is supplied to PaletteFaceColorResolver at construction time. |
| None | Per-face coloring is disabled. The shape emits no vertex color channel and renders with the standard URP Lit material plus its Tint. |
| Uniform | Every face takes the same fixed palette entry. Useful for tinting a whole shape from a palette while still emitting the vertex color channel the lit shader expects. |