Game.Rendering.CullingInfo
Assembly:
{{ Likely defined in the game's runtime assembly (e.g. "Game" or "Assembly-CSharp"). Confirm exact assembly name from your build or the game's metadata. }}
Namespace: Game.Rendering
Type:
struct
Base:
IComponentData, IQueryTypeParameter, IEmptySerializable
Summary:
{{ Represents an ECS component that carries culling-related data for a renderable entity. CullingInfo stores the world-space bounds and a radius used for visibility checks, an index used by the engine's culling system, a mask used to filter which culling sets the entity belongs to, a minimum LOD level, and a small flag indicating whether the entity passed the latest culling test. This component is a plain, blittable struct suitable for use in jobs and entity queries. }}
Fields
-
public Colossal.Mathematics.Bounds3 m_Bounds
{{ World-space axis-aligned bounding box for the object. Used by culling systems to test visibility against view frusta, occluders, and other culling volumes. Bounds3 comes from Colossal.Mathematics. }} -
public System.Single m_Radius
{{ Bounding sphere radius (float). Often used as a fast approximate test for visibility or distance-based LOD calculations. }} -
public System.Int32 m_CullingIndex
{{ Integer index or identifier used by the rendering/culling subsystem to reference this object's entry in culling structures (e.g., arrays, ring buffers, or GPU-visible lists). The engine may set or read this value to correlate state. }} -
public Game.Common.BoundsMask m_Mask
{{ A bitmask indicating which culling layers/sets this object participates in. Used to include/exclude the object from specific culling passes or groups. BoundsMask is defined in Game.Common. }} -
public System.Byte m_MinLod
{{ Minimum level-of-detail (LOD) the object should use. Stored as a byte for compactness. The meaning (higher vs lower number = higher detail) follows the game's LOD conventions. }} -
public System.Byte m_PassedCulling
{{ Small flag value (0/1) indicating whether the object passed the most recent culling test. Systems will set this to mark visible objects for subsequent rendering steps. Stored as a byte to keep the struct compact. }}
Properties
{{ This struct exposes no C# properties — it uses public fields for direct, blittable access in ECS and jobs. }}
Constructors
public CullingInfo()
{{ As a value type (struct), CullingInfo has the default parameterless constructor that zero-initializes fields. Initialize fields explicitly when adding the component to an entity to ensure correct culling behavior. }}
Methods
{{ There are no methods defined on this struct. It is a plain data container used by systems. Serialization is provided via the IEmptySerializable marker and the game's serialization pipeline when applicable. }}
Usage Example
// Example: add or set culling info for an entity
var info = new Game.Rendering.CullingInfo
{
m_Bounds = new Colossal.Mathematics.Bounds3(center, extents), // replace with appropriate constructor
m_Radius = 5.0f,
m_CullingIndex = -1, // default/unassigned
m_Mask = someBoundsMask,
m_MinLod = 0, // highest detail, for example
m_PassedCulling = 0 // not yet tested
};
entityManager.AddComponentData(entity, info);
// Later, a culling system may set m_PassedCulling = 1 for visible entities,
// and update m_CullingIndex when registering the entity with internal structures.
{{ Notes: - Because CullingInfo is an IComponentData, modify it via the EntityManager or in a job using ComponentDataFromEntity / ArchetypeChunk APIs. - The struct is designed to be small and blittable; keep it that way to avoid performance and safety issues in jobs. - Confirm the semantics of m_MinLod and m_Mask against the game's rendering/culling documentation or existing code to ensure correct interpretation of values. }}