ModelPartFlags
Description
Enumeration of flags for IModelPart objects that affect rendering.
Public / Constants
FrontFaces
Front-facing triangles are visible.
This flag is redundant if PrimitiveBatch.IsTriangles of IModelPart.Batch is false
.
BackFaces
Back-facing triangles are visible.
This flag is redundant if PrimitiveBatch.IsTriangles of IModelPart.Batch is false
.
Transparent
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.IMaterialPart.Value of IModelPart.Material is neither 0
nor 1
.
This flag is redundant if ColorF.A of IMaterial.BaseColor. IMaterialPart.Value is 1
, both IMaterial.BaseColor. IMaterialPartBase.Map and IMaterial.Opacity. IMaterialPartBase.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
The model part is opaque.
For opaque model parts, all transparency information is ignored, i.e. ColorF.A of IMaterial.BaseColor. IMaterialPart.Value, the alpha channel of IMaterial.BaseColor.IMaterialPartBase.Map and IMaterial.Opacity. This flag takes precedence over Transparent.
This flag is redundant if ColorF.A of IMaterial.BaseColor. IMaterialPart.Value is 1
, both IMaterial.BaseColor. IMaterialPartBase.Map and IMaterial.Opacity. IMaterialPartBase.Map are null
and vertex data is opaque (i.e. ModelVertexFormat.Color is not present or VertexAlphaIsOcclusion is present).
- See also
VertexColorIsBaseColor
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.IMaterialPartBase.Map is null
, vertex colors (if present) will always be used to modulate the uniform IMaterial.BaseColor.IMaterialPart.Value. Otherwise, vertex colors will be used to modulate the material base color only if this flag is present.
This flag is redundant if IModelGeometry.VertexFormat of IModelPart.Geometry does not include ModelVertexFormat.Color or if IMaterial.BaseColor.IMaterialPartBase.Map is null
.
- See also
VertexAlphaIsOcclusion
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.