Keywords: main

Next: 1.11 Shadow Up: 1. Base Shaders/A> Previous: 1.9 Photon

# 1.10 Light

Point

This is a simple point light shader emitting light uniformly in all directions.

        color "mib_light_point" (
            color           "color",
            boolean         "shadow",
            scalar          "factor",
            boolean         "atten",
            scalar          "start",
            scalar          "stop")

color is the light color.

shadow, if true, enables shadows. The light will be diminished or blocked by occluding objects between the light and the illuminated object.

factor only has an effect if shadows are enabled, and blends from the shadow color (0, the default) to the light color (1). Effectively, values greater than 0 let the light penetrate occluding objects. At 1, no shadows appear.

atten, if true, enables distance attenuation such that the light intensity begins to fall off at the distance start and fades up the distance stop, where no light remains.

start only has an effect if distance attenuation is enabled. It specifies the distance from the light where attenuation begins.

stop only has an effect if distance attenuation is enabled. It specifies the maximum distance reached by the light.

Spot

The spot light is similar to the point light, except that it also supports angle attenuation based on the light direction. It takes the light direction and the spread (the cosine of the outer boundary angle) from the light definition.

        color "mib_light_spot" (
            color           "color",
            boolean         "shadow",
            scalar          "factor",
            boolean         "atten",
            scalar          "start",
            scalar          "stop",
            scalar          "cone")

color is the light color.

shadow, if true, enables shadows. The light will be diminished or blocked by occluding objects between the light and the illuminated object.

factor only has an effect if shadows are enabled, and blends from the shadow color (0, the default) to the light color (1). Effectively, values greater than 0 let the light penetrate occluding objects. At 1, no shadows appear.

atten, if true, enables distance attenuation such that the light intensity begins to fall off at the distance start and fades up the distance stop, where no light remains.

start only has an effect if distance attenuation is enabled. It specifies the distance from the light where attenuation begins.

stop only has an effect if distance attenuation is enabled. It specifies the maximum distance reached by the light.

cone specifies the cosine of the angle of the inner cone that illuminates with full intensity, in degrees. The value must be in the range 0 (hemisphere) to 1 (null diameter). The cone cannot exceed the spread angle from the light definition.

Infinite

Infinite (directional) lights cast parallel rays in the light direction. The origin is infinitely far away (and left unspecified), and there is no distance attenuation.

        color "mib_light_infinite" (
            color           "color",
            boolean         "shadow",
            scalar          "factor")

color is the light color.

shadow, if true, enables shadows. The light will be diminished or blocked by occluding objects between the light and the illuminated object.

factor only has an effect if shadows are enabled, and blends from the shadow color (0, the default) to the light color (1). Effectively, values greater than 0 let the light penetrate occluding objects. At 1, no shadows appear.

Next: 1.11 Shadow Up: 1. Base Shaders/A> Previous: 1.9 Photon