environment VEX function

Returns the color of the environment texture.

Contexts: displace, fog, light, photon, shadow, surface

See also: isixpack

  1. vector environment(string texture_filename, vector relect_dir)

  2. vector4 environment(string texture_filename, vector relect_dir)

  3. vector environment(string texture_filename, vector relect_dir0, vector relect_dir1, vector relect_dir2, vector relect_dir3)

  4. vector4 environment(string texture_filename, vector relect_dir0, vector relect_dir1, vector relect_dir2, vector relect_dir3)

Returns the color of the environment texture in the direction given by the reflect_dir argument. The signatures that specify four vectors filter the map pixels found within the cone defined by the vectors.

Note

If you specify the envobject keyword argument, it transforms the reflect_dir into another space. See vtransform for information on specifying spaces.

environment("sky.rat", {0, 1, 0}, "envobject", "space:world")

The default value for envobject is space:current.

You can optionally specify filtering options .