Garry's Mod Wiki

render.SetModelLighting

  render.SetModelLighting( number lightDirection, number red, number green, number blue )

Description

Sets up the ambient lighting for any upcoming render operation. Ambient lighting can be seen as a cube enclosing the object to be drawn, each of its faces representing a directional light source that shines towards the object. Thus, there is a total of six different light sources that can be configured separately.

Light color components are not restricted to a specific range (i.e. 0-255), instead, higher values will result in a brighter light.

Arguments

1 number lightDirection
The light source to edit, see BOX enum.
2 number red
The red component of the light color.
3 number green
The green component of the light color.
4 number blue
The blue component of the light color.