DIFF

Light API

Part of Camera

Topics

Typedefs

HLIGHTint[]

Enums

Values

AMBIENT
CASTSHADOW
CHEAPfor cheaper dynamic lights, like muzzle flashes (might use cheaper rendering method)
DIRECTIONAL
DYNAMICDynamic 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
POINTpoint light, all directional light
SPOTspot light, direction is determined by owner (entity)

Functions

proto HLIGHT AddLight(IEntity owner, LightType type, LightFlags flags, float radius, vector color)creates lightmore…
proto native int ClearLightFlags(HLIGHT light, LightFlags flags)
proto native float GetSceneHDRMul(int camera)scene light multiplier (based on measured scene light levels) - pre-exposure of lightmore…
proto native bool RemoveLight(HLIGHT light)removes lightmore…
proto native bool SetLightCone(HLIGHT light, float cone)Sets light cone in degrees (for LightType.SPOT).
proto native bool SetLightEx(HLIGHT light, float radius, vector color)
proto native int SetLightFlags(HLIGHT light, LightFlags flags)
proto native bool SetLightTexture(HLIGHT light, string cubemap)sets lookup texture for projection lights

Function Documentation

AddLight

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

creates light


GetSceneHDRMul

proto native float GetSceneHDRMul(int camera)

scene light multiplier (based on measured scene light levels) - pre-exposure of light


RemoveLight

proto native bool RemoveLight(HLIGHT light)

removes light