Home Reference VEX VEX functions 

rayimport vex function

Imports a value sent by a shader in a gather loop.

  1. int rayimport(string name, int &value)

  2. int rayimport(string name, float &value)

  3. int rayimport(string name, vector &value)

  4. int rayimport(string name, vector4 &value)

  5. int rayimport(string name, matrix3 &value)

  6. int rayimport(string name, matrix &value)

  7. int rayimport(string name, string &value)

This function extracts information any passed when the surface is hit by a ray fired by the gather. The first argument is the name, as passed using a "send:name", value argument pair in gather (but minus the send: prefix). The second argument is a variable in which to put the imported value.

This function returns 1 if a value by the given name was successfully imported.

See the help page for the gather for more information.