Lights in the current supported RAGE titles such as Grand Theft Auto V and Red Dead Redemption II are created using a CLightAttrDef
struct, which is a part of CExtensionDefLightEffect
.
Its mission is to create artificial lighting in the map and interiors using saved values for certain parameters.
List of all parameters with their type and description is shown below:
entities
Object placement, rotation and additional features.
Field | Type | Description |
---|---|---|
posn | array | Coordinates of the light in the local space. |
colour | array | Light color in RGB values. |
flashiness | uchar | Ability to flash the light using predefined presets. |
flags | uint | Specific feature applied to this particular light. |
boneTag | short | Assignment of light to the model bone. |
lightType | uchar | Type of the rendered light (spot, point, capsule). |
groupId | uchar | Unknown usage. |
timeFlags | uint | Sets a time of rendering light. |
falloff | float | Specifies a range of light, in meters. |
falloffExponent | float | - |
cullingPlane | array | Limiting a range of light stored in array4. |
shadowBlur | uchar | Blurring shadow texture in 0-255 range. |
padding1 | uchar | Unknown usage. |
padding2 | short | Unknown usage. |
padding3 | uint | Unknown usage. |
volIntensity | float | Intensity of volumetric lighting. |
volSizeScale | float | Scale of volumetric lighting. |
volOuterColour | array | Volumetric light color in RGB values. |
lightHash | uchar | Hash of the light entry. |
volOuterIntensity | float | Intensity of volumetric fog effect. |
coronaSize | float | Size of the 2D corona texture. |
volOuterExponent | float | Unknown usage. |
lightFadeDistance | uchar | Distance of rendered light, in meters. |
shadowFadeDistance | uchar | Distance of shadow texture casted by light, in meters. |
specularFadeDistance | uchar | Distance of specular effect, in meters. |
volumetricFadeDistance | uchar | Distance of volumetric fog effect, in meters. |
shadowNearClip | float | Near clip distance of shadow texture casted by light. |
coronaIntensity | float | Intensity of 2D corona texture. |
coronaZBias | float | Z bias of 2D corona texture. |
direction | array | Direction of casted light using spot light type. |
tangent | array | Calculated tangent of casted light using spot light type. |
coneInnerAngle | float | Inner angle cone for light using spot light type. |
coneOuterAngle | float | Outer angle cone for light using spot light type. |
extents | array | Unknown usage. |
projectedTextureKey | uint | Light texture stored in decimal hash for projecting texture. |