Garry's Mod Wiki

LocalLight

Description

Table structure used for render.SetLocalModelLights.

Parameters

type [number]

The type of the light source, see Enums/MATERIAL_LIGHT.

color [Vector]

The color of the light source (x is red, y is green, z is blue). Values are not restricted to a specific range, higher values will result in a brighter light.

pos [Vector]

The origin of the light in world coordinates.

dir [Vector]

The direction of the light. Only required for directional and spot lights.

range [number]

The maximum range of the light source. Does not actually control light attenuation. Usually left at 0 for infinite range.

angularFalloff [number]

Angular falloff exponent for spot lights. Higher values result in a sharper transition between the inner cone and the outer cone.

innerAngle [number]

The inner cone angle for spot lights, in degrees. No angular falloff will occur inside that cone.

outerAngle [number]

The outer cone angle for spot lights, in degrees.

fiftyPercentDistance [number]

The distance at which the light will fade to 50% of its brightness.

zeroPercentDistance [number]

The distance at which the light will completely fade out.

quadraticFalloff [number]

The quadratic term of the light falloff. This will only be used if fiftyPercentDistance and zeroPercentDistance are not supplied, and allows finer control over light attenuation.

linearFalloff [number]

The linear term of the light falloff. This will only be used if fiftyPercentDistance and zeroPercentDistance are not supplied, and allows finer control over light attenuation.

constantFalloff [number]

The constant term of the light falloff. This will only be used if fiftyPercentDistance and zeroPercentDistance are not supplied, and allows finer control over light attenuation.

Page Links


Special Pages


Wikis

?

Render Time: 48ms

Session 0
DB GetPage 4
Generate Html 22
SaveChanges 8
Render Body 0
Render Sidebar 12