##### Ninja Library - Light Function

# njSetLightAlpha

Sets the effect of the light that was set by the njCreateLight() function on the transparency of a material

### FORMAT

`

  void njSetLightAlpha( *ptr, rate )
  NJS_LIGHT *ptr
  Float rate

`

### PARAMETER

  `*ptr` | Pointer to light source
  `rate` | Magnification

### RETURN

  None

### DESCRIPTION

  Sets change in transparency (alpha value) by specula. With increasing luminance of light specula, material transparency decreases (opacity increases), however, effectiveness is expressed. The parameter default value (value set by CreateLight function) is "0," no reflection. Parameter is set as magnification times specula luminance (specula luminance x magnification). Result is added to the material alpha value.

### EXAMPLE

      #include <Shinobi.h>
      	:
      NJS_LIGHT light;
      sbInitSystem( NJD_RESOLUTION_VGA, NJD_FRAMEBUFFER_MODE_RGB565, 1);
      njCreateLight(&light, NJD_DIR_LIGHT);
      	:
      /* Reduce transparency of specula luminance by half */
      njSetLightAlpha(&light, 0.5f);

### NOTE

  Light must be specified in `njCreateLight()` function. When specified using `njFastDrawModel(),` `njFastDrawObject(),` `njFastDrawMotion(),` and `njFastAction(),` this function is not reflected.

### REFERENCE

  `njCreateLight()
  `

njSetLightAlpha

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999