|Context(s)||displace fog surface|
This function only works with area lights.
int intersect_lights(int lightids, vector pos, vector dir, float time, int &idx, float &dist, vector &clr, float &scale, ...)
An array of light IDs, as returned by getlights.
The origin of the ray (such as the global variable
Direction vector from the origin. The length of this vector does not affect the distance the ray will travel.
Time to send the ray at.
The function modifies the values of the following arguments:
The light index for the light that was hit by the ray, or -1 if no intersection was found.
The distance to the nearest intersected light.
The light color set by the light shader.
The light average hemispherical intensity (for area lights).
A component bitmask indicating what types of component bounces the light affects,
0 if the ray did not hit a light.