Z.LightPriority

Studio

Z.LightPriority

enum LightPriority { "auto", "important", "unimportant" }

The Z.LightPriority, set by the priority(...) function of a Z.Light node, determines if the light is treated as a pixel or vertex light.

Pixel lights are calculated per pixel, resulting in a more accurate color outcome, but more expensive to calculate.

Vertex lights are calculated per vertex, and the final color is interpolated per pixel, It's faster but not as accurate.

If a light's priority is set to important and the number of existing important lights in a scene is less than the numPixelLights value of a lit object's material, that light will act as a pixel light for that object, otherwise, it will act as a vertex light.   

If a light's priority is set to unimportant that light will act as a vertex light for any lit object's in a scene.

If a light's priority is set to auto and the number of existing important lights in a scene is less than the numPixelLights value of a lit object's material and the light is either the brightest Z.DirectionalLight (based on the instensity of the light) or the nearest Z.PointLight or Z.SpotLight (compared by the node distance) that light will act as a pixel light for that object, otherwise, it will act as a vertex light.   

Default Value: auto

Member List

Member Description
auto Depending on the number of lights, intensity, and distance of the light from the object, the light will either be set as a pixel or vertex light.
important The light will be set as a pixel light if possible depending on the numPixelLights property of the lighting material.
unimportant The light will be set as a vertex light.
Open in new window