The color of sunlight, default (128,128,128).
The basic environment lighting of an entity outside the PRV range (such as an entity in an unlit level or with no ground below), default (64,64,64).
(0,0,0) .. (255,255,255).
- The sun_color vector is multiplied by the sun brightness (sun_light) to give the final sun color.
- A7.60 Sun and ambient color are loaded from their Map Properties values of the current level when their map values are nonzero. Otherwise they stay at their default values, giving medium brightness to all objects. Loading from the level can be prevented by setting sun or ambient colors at zero in Map Properties, or by setting the compatibility variable at 6 or below.
- The sun_color is a dynamic light and can be changed anytime; the ambient_color is static
in versions before 8.06 and only affects a level loaded afterwards. From 8.06 on, ambient_color can also be changed anytime, f.i. for day-night transitions.
- For affecting the overall brightness dependent on the view, the view.ambient parameter can also be used.
level_load("mylevel.wmb"); // set sun_color and ambient_color from the map properties
vec_set(sun_color,vector(0,0,255)); // make sun light all red
sun_pos, sun_angle, sun_light, ambient, sky_color, screen_color, d3d_fogcolor, compatibility, lighting
► latest version online