ModelPartFlags

Description

[Flags]
enum Tinman.Engine.Models.ModelPartFlags

Enumeration of flags for IModelPart objects that affect rendering.

Public / Constants

None

public constant None → (0:int32)

No model part flags.

FrontFaces

public constant FrontFaces → (1:int32)

Front-facing triangles are visible.

This flag is redundant if PrimitiveBatch.IsTriangles of IModelPart.Batch is false.

BackFaces

public constant BackFaces → (2:int32)

Back-facing triangles are visible.

This flag is redundant if PrimitiveBatch.IsTriangles of IModelPart.Batch is false.

Transparent

public constant Transparent → (4:int32)

The model part is transparent.

Transparent model parts are rendered with RenderStatePreset.AlphaBlending, using order independent transparency (if supported, see RenderStageFlags.OrderIndependentTransparency). Other model parts are rendered with RenderStatePreset.AlphaCoverage, using standard depth ordering via the Z-buffer, unless Opaque is present.

This flag will be present implicitly if ColorF.A of IMaterial.BaseColor.MaterialPart.Value of IModelPart.Material is neither 0 nor 1.

This flag is redundant if ColorF.A of IMaterial.BaseColor. MaterialPart.Value is 1, both IMaterial.BaseColor. IMaterialPart.Map and IMaterial.Opacity. IMaterialPart.Map are null and vertex data is opaque (i.e. ModelVertexFormat.Color is not present or VertexAlphaIsOcclusion is present). This flag is also redundant if Opaque is present.

Opaque

public constant Opaque → (8:int32)

The model part is opaque.

For opaque model parts, all transparency information is ignored, i.e. ColorF.A of IMaterial.BaseColor. MaterialPart.Value, the alpha channel of IMaterial.BaseColor.IMaterialPart.Map and IMaterial.Opacity. This flag takes precedence over Transparent.

This flag is redundant if ColorF.A of IMaterial.BaseColor. MaterialPart.Value is 1, both IMaterial.BaseColor. IMaterialPart.Map and IMaterial.Opacity. IMaterialPart.Map are null and vertex data is opaque (i.e. ModelVertexFormat.Color is not present or VertexAlphaIsOcclusion is present).

NoLighting

public constant NoLighting → (16:int32)

Do not perform lighting on the model part?

VertexColorIsBaseColor

public constant VertexColorIsBaseColor → (32:int32)

The color channels (linear sRGB) of the vertex colors (see ModelVertexFormat.Color) shall be used to modulate the material base color, in addition to IMaterial.BaseColor.

If IMaterial.BaseColor.IMaterialPart.Map is null, vertex colors (if present) will always be used to modulate the uniform IMaterial.BaseColor.MaterialPart.Value. Otherwise, vertex colors will be used to modulate the material base color only if this flag is present.

See also

IMaterial

VertexAlphaIsOcclusion

public constant VertexAlphaIsOcclusion → (64:int32)

The alpha channel of the vertex colors (see ModelVertexFormat.Color) stores a linear ambient occlusion term, instead of transparency information.

This flag is redundant if IModelGeometry.VertexFormat of IModelPart.Geometry does not include ModelVertexFormat.Color.

All

public constant All → (127:int32)

All model part flags.