Game.Rendering.SpotLightShape
Assembly: Assembly-CSharp
Namespace: Game.Rendering
Type: public enum
Base: System.Enum
Summary:
Defines the possible geometric shapes used for spot light (spotlight) rendering. Use this enum to select how the light's volume and projection are represented in the renderer: a circular cone, a pyramidal frustum, or an axis-aligned box. These choices affect shadow projection, light culling, and the visual falloff shape.
Fields
-
Cone
Represents a circular/conical spot light volume (typical spotlight). Underlying enum value 0. Use when the light should project as a round cone. -
Pyramid
Represents a pyramidal (frustum-like) spot light volume. Underlying enum value 1. Useful for spotlights that are approximated by a square frustum or when matching a projector with a rectangular lens. -
Box
Represents an axis-aligned box volume. Underlying enum value 2. Use for lights that should affect a rectangular prism region (more like an area/box light approximation).
Properties
- This enum does not define instance properties. It is a plain enum type deriving from System.Enum.
Constructors
- No explicit constructors are defined for this enum. Enum values are the named constants above with default integer backing values (Cone = 0, Pyramid = 1, Box = 2).
Methods
- This enum does not declare any methods. Standard System.Enum methods (ToString, HasFlag, GetValues, etc.) are available.
Usage Example
// Choose a spotlight shape
Game.Rendering.SpotLightShape shape = Game.Rendering.SpotLightShape.Cone;
// Example usage in a hypothetical SpotLight component
public class SpotLightComponent
{
public Game.Rendering.SpotLightShape LightShape { get; set; }
public void ConfigureForShape()
{
switch (LightShape)
{
case Game.Rendering.SpotLightShape.Cone:
// configure cone-specific shader keywords / parameters
break;
case Game.Rendering.SpotLightShape.Pyramid:
// configure pyramid/frustum projection
break;
case Game.Rendering.SpotLightShape.Box:
// configure box volume and culling
break;
}
}
}