Garry's Mod Wiki

Garry's Mod Wiki

  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 with BOX enum 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.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...