##### Ninja Library - Light Function

# njCnkSetEasyLightIntensity

Sets chunk easy light intensity

### FORMAT

`

  void njCnkSetEasyLightIntensity( diff, ambi )
  float diff
  float ambi

`

### PARAMETER

  `diff` | Diffuse intensity
  `ambi` | Ambient intensity

### RETURN

  None

### DESCRIPTION

  Sets the light intensity for the njCnkEasyDrawObject (njCnkEasyDrawModel).

  When 1.0f is set for diffuse and 0.0f for ambient, the spot at the opposite from the light is fully dark.

  In the real world, it does not get fully dark because of the reflections even in the shadow. Therefore, a certain amount of ambient light should always be set. For example, by setting ambient to 0.2f, the image does not get darker than 20%.

  Setting 1.0f for ambient makes both items 100% and takes off all shadow.

### EXAMPLE

      sbInitSystem( NJD_RESOLUTION_640x240_NTSCNI, NJD_FRAMEBUFFER_MODE_RGB565, 1 );
      njInitVertexBuffer( 1000000, 0, 1000, 0, 0 );
      njInitMatrix( matrix, 8 , 0);
      njInit3D( vbuf, 4096 );
      njInitView( &view );
      njSetView( &view );
      njCnkSetEasyLight( 0.f, 0.f, 1.0f );
      njCnkSetEasyLightIntensity( 1.0f, 0.0f );
      njCnkSetEasyLightColor( 1.0f, 1.0f, 1.0f );
      njClearMatrix();
      njTranslate( NULL, 0.f, 0.f, -10.f );
      njRotateXYZ( NULL, rx,ry,rz );
      njCnkEasyDrawObject( object );

### REFERENCE

  `njCnkEasyDrawObject()
  njCnkEasyDrawModel()
  njCnkSetEasyLight()
  njCnkSetEasyLightColor()
  `

njCnkSetEasyLightIntensity

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999