Lighting

When working with 3D scenes, what you draw with the GameMaker functions may look rather "flat" because there is no lighting to give them realism and life. This means that the colours of the primitive faces are equal all over, independent of their orientation or position, therefore, to create more realistic looking scenes you must enable lighting and place lights at the correct places within the 3D world. This section outlines the functions available to help you achieve that.

NOTE The lighting functions require a normal property in the vertex format of whatever's being drawn. This means this will not work with regular draw functions like draw_sprite, and vertex buffers that need to use lighting will need to use a vertex format with normals.

Function Reference

 

For using these properties in your shaders, see: Built-In Shader Constants