DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Light API

Topics

 Trace&Visibility API
 

Определения типов

typedef int[] HLIGHT
 Light handle.
 

Перечисления

enum  LightType { POINT , SPOT , DIRECTIONAL , AMBIENT }
 
enum  LightFlags { DYNAMIC , CASTSHADOW , CHEAP }
 

Функции

proto HLIGHT AddLight (IEntity owner, LightType type, LightFlags flags, float radius, vector color)
 
proto native bool RemoveLight (HLIGHT light)
 removes light
 
proto native bool SetLightEx (HLIGHT light, float radius, vector color)
 
proto native bool SetLightTexture (HLIGHT light, string cubemap)
 sets lookup texture for projection lights
 
proto native int SetLightFlags (HLIGHT light, LightFlags flags)
 
proto native int ClearLightFlags (HLIGHT light, LightFlags flags)
 
proto native bool SetLightCone (HLIGHT light, float cone)
 Sets light cone in degrees (for LightType.SPOT).
 
proto native float GetSceneHDRMul (int camera)
 

Подробное описание

Типы

◆ HLIGHT

Light handle.

Перечисления

◆ LightFlags

Элементы перечислений
DYNAMIC 

Dynamic objects are included in the query.

Dynamic light. There is limit 512 dynamic lights per world and 32 per camera view. They are faster when moving and changing shape. Also they are always attached to owner entity

CASTSHADOW 
CHEAP 

for cheaper dynamic lights, like muzzle flashes (might use cheaper rendering method)

133{
138
139 DYNAMIC,
142 CHEAP
143};
@ DYNAMIC
Dynamic objects are included in the query.
Definition EnWorld.c:139
@ CASTSHADOW
Definition EnWorld.c:140
@ CHEAP
for cheaper dynamic lights, like muzzle flashes (might use cheaper rendering method)
Definition EnWorld.c:142

◆ LightType

Элементы перечислений
POINT 
SPOT 
DIRECTIONAL 
AMBIENT 
125{
126 POINT, //< point light, all directional light
127 SPOT, //< spot light, direction is determined by owner (entity)
129 AMBIENT
130};
@ AMBIENT
Definition EnWorld.c:129
@ SPOT
Definition EnWorld.c:127
@ POINT
Definition EnWorld.c:126
@ DIRECTIONAL
Definition EnWorld.c:128

Функции

◆ AddLight()

proto HLIGHT AddLight ( IEntity owner,
LightType type,
LightFlags flags,
float radius,
vector color )

creates light

◆ ClearLightFlags()

proto native int ClearLightFlags ( HLIGHT light,
LightFlags flags )

◆ GetSceneHDRMul()

proto native float GetSceneHDRMul ( int camera)

scene multiplicator of light (based on measured scene light levels) - preexposure of light

Используется в GameplayEffectWidgets_base::CalculateBreathEffect().

◆ RemoveLight()

proto native bool RemoveLight ( HLIGHT light)

removes light

◆ SetLightCone()

proto native bool SetLightCone ( HLIGHT light,
float cone )

Sets light cone in degrees (for LightType.SPOT).

◆ SetLightEx()

proto native bool SetLightEx ( HLIGHT light,
float radius,
vector color )

◆ SetLightFlags()

proto native int SetLightFlags ( HLIGHT light,
LightFlags flags )

◆ SetLightTexture()

proto native bool SetLightTexture ( HLIGHT light,
string cubemap )

sets lookup texture for projection lights