Imports a variable sent by a surface shader in an illuminance loop.
int simport(string name, int value&)int simport(string name, float value&)int simport(string name, vector value&)int simport(string name, vector4 value&)int simport(string name, matrix value&)int simport(string name, matrix3 value&)int simport(string name, string value&)
Imports a variable from the surface shader.
Mantra runs the shaders for a surface in a fixed order:
Displacement
Surface (possibly calling light shaders in
illuminanceloops)Fog (possibly calling light shaders in
illuminanceloops)
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.