Skip to content

storelightexport

Context(s)displace fog surface

void  storelightexport(string lightname, string exportname, <type>value)

void  storelightexport(string lightname, string exportname, <type>value[])

Stores a per-light export to a shader export variable. This method should normally be called for each light to ensure that all light exports for the given variable are created, for example by placing the call in an illuminance() loop or a loop over the light array.

This method replaced the storelightexports() method used in Houdini 12.5 and earlier. Examples

examples

surface test(export vector perlight = {0,0,0})
{
int lights[] = getlights();
for (int i = 0; i < len(lights); i++)
{
vector val = set(lights[i], 0, 0);
storelightexport(getlightname(lights[i]), "perlight", val);
}
}