Game.Rendering.NetProperty
Assembly: Game
Namespace: Game.Rendering
Type: enum
Base: System.Enum
Summary:
NetProperty is an enumeration of per-instance shader/property identifiers used by the game's net (road/track) rendering system. Each enum member is annotated with an InstanceProperty attribute that maps the enum value to the underlying shader/property name, the CLR type expected for the property (float, float4, float4x4, etc.), batch usage flags (BatchFlags), a semantic/index value, and a boolean flag (as used by the attribute). These mappings are used by the renderer to bind instance data (composition matrices, sync vectors, infoview/outline colors, LOD fade values, etc.) to GPU shader properties.
Fields
-
CompositionMatrix0
InstanceProperty("colossal_CompositionMatrix0", typeof(float4x4), (BatchFlags)0, 0, false)
Maps to a 4x4 composition matrix used for instance composition (no special BatchFlags). -
CompositionMatrix1
InstanceProperty("colossal_CompositionMatrix1", typeof(float4x4), (BatchFlags)0, 0, false)
Second composition matrix slot. -
CompositionMatrix2
InstanceProperty("colossal_CompositionMatrix2", typeof(float4x4), (BatchFlags)0, 0, false)
Third composition matrix slot. -
CompositionMatrix3
InstanceProperty("colossal_CompositionMatrix3", typeof(float4x4), (BatchFlags)0, 0, false)
Fourth composition matrix slot. -
CompositionMatrix4
InstanceProperty("colossal_CompositionMatrix4", typeof(float4x4), BatchFlags.Node, 0, false)
Composition matrix used for Node batch type (BatchFlags.Node). -
CompositionMatrix5
InstanceProperty("colossal_CompositionMatrix5", typeof(float4x4), BatchFlags.Roundabout, 0, false)
Composition matrix used for Roundabout batch type. -
CompositionMatrix6
InstanceProperty("colossal_CompositionMatrix6", typeof(float4x4), BatchFlags.Node, 0, false)
Additional composition matrix for Node batch type. -
CompositionMatrix7
InstanceProperty("colossal_CompositionMatrix7", typeof(float4x4), BatchFlags.Node, 0, false)
Another composition matrix for Node batch type. -
CompositionSync0
InstanceProperty("colossal_CompositionSync0", typeof(float4), BatchFlags.Node, 0, false)
Per-instance sync vector (float4) for Node batches. -
CompositionSync1
InstanceProperty("colossal_CompositionSync1", typeof(float4), BatchFlags.Node, 0, false)
Additional sync vector for Node batches. -
CompositionSync2
InstanceProperty("colossal_CompositionSync2", typeof(float4), BatchFlags.Node, 0, false)
Additional sync vector for Node batches. -
CompositionSync3
InstanceProperty("colossal_CompositionSync3", typeof(float4), BatchFlags.Node, 0, false)
Additional sync vector for Node batches. -
InfoviewColor
InstanceProperty("colossal_NetInfoviewColor", typeof(float4), BatchFlags.InfoviewColor, 0, false)
Color used when rendering infoview overlays. -
OutlineColors
InstanceProperty("_Outlines_Color", typeof(float4), BatchFlags.Outline, 0, true)
Outline color property (note the attribute's last boolean is true for this entry — typically indicates a different handling such as instancing or special binding). -
LodFade0
InstanceProperty("colossal_LodFade", typeof(float), BatchFlags.LodFade, 0, false)
LOD fade parameter (slot 0). -
LodFade1
InstanceProperty("colossal_LodFade", typeof(float), BatchFlags.LodFade, 1, false)
LOD fade parameter (slot 1). -
Count
Sentinel value representing the number of enum members.
Properties
- None declared on this enum. The enum values are simple discriminants and all mapping information is provided via the InstanceProperty attributes.
Constructors
- None declared (enum uses the implicit System.Enum behavior).
Methods
- None declared in this source. Standard System.Enum methods (ToString, HasFlag, etc.) are available.
Usage Example
// Direct usage as a discriminant:
NetProperty p = NetProperty.CompositionMatrix0;
// Retrieving the InstanceProperty attribute via reflection to get the shader/property metadata:
using System.Reflection;
MemberInfo member = typeof(NetProperty).GetMember(p.ToString())[0];
var attr = member.GetCustomAttribute(typeof(InstancePropertyAttribute)) as InstancePropertyAttribute;
if (attr != null)
{
// The InstancePropertyAttribute typically exposes the shader property name, type, flags, index and a boolean.
// Access properties according to the attribute's API, e.g.:
// string shaderName = attr.PropertyName;
// Type propertyType = attr.PropertyType;
// BatchFlags flags = attr.Flags;
// int index = attr.Index;
// bool special = attr.SomeBooleanFlag;
}
Notes: - The attribute parameter tuples shown in the field list reflect the InstanceProperty attribute usage in the source: (string propertyName, Type clrType, BatchFlags flags, int index, bool flag). - BatchFlags values (Node, Roundabout, InfoviewColor, Outline, LodFade) indicate which renderer batch types use the property.