dimport VEX function

Imports a variable from the displacement shader for the surface.

Contexts: fog, light, photon, shadow, surface

See also: simport

  1. int dimport(string , int &)

  2. int dimport(string , float &)

  3. int dimport(string , vector &)

  4. int dimport(string , vector4 &)

  5. int dimport(string , matrix &)

  6. int dimport(string , matrix3 &)

  7. int dimport(string , string &)

Imports a variable from the displacement shader for the surface.

Mantra runs the shaders for a surface in a fixed order:

  1. Displacement

  2. Surface (possibly calling light shaders in illuminance loops)

  3. Fog (possibly calling light shaders in illuminance loops)

Once the displacement shader has run, you can use dimport to retrieve exported variables from it. Once the surface shader has run, you can use simport to retrieve exported variables from it.

If the shader variable named by the first argument is defined and exported, the function returns 1 and puts the value in the second argument. Otherwise, it returns 0.