anchor.diff:  ifdef::env-github,env-browser[:outfilesuffix: .adoc]
   
   
  -image:jme3/advanced/shading-ani.gif[Examples of shading and lighting.,with="",height=""]
  +image:jme3/advanced/shading-ani.gif[Examples of shading and lighting.,width="",height=""]
   
   Light and Shadow are two separate things in 3D engines, although we percieve them together in real life:
   
  
positive.code: === SpotLight
  
  
  image::jme3/advanced/spotlight.png[Spotlight,with="",height="",align="right"]
  
  
  A SpotLight sends out a distinct beam or cone of light. A SpotLight has a direction, a position, distance (range) and two angles. The inner angle is the central maximum of the light cone, the outer angle the edge of the light cone. Everything outside the light cone's angles is not affected by the light.
  
negative.code: 
  Here's a sample application which demonstrates both DirectionalLightShadowRenderer and DirectionalLightShadowFilter:
  
  *  link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/light/TestDirectionalLightShadow.java[TestDirectionalLightShadow.java]
  
  Here is the key code fragment:
  
  