Class SpotLightShadowFilter

All Implemented Interfaces:
Savable, JmeCloneable, Cloneable

public class SpotLightShadowFilter extends AbstractShadowFilter<SpotLightShadowRenderer>
This Filter does basically the same as a SpotLightShadowRenderer except it renders the post shadow pass as a fullscreen quad pass instead of a geometry pass. It's mostly faster than PssmShadowRenderer as long as you have more than about ten shadow receiving objects. The expense is the drawback that the shadow Receive mode set on spatial is ignored. So basically all and only objects that render depth in the scene receive shadows. API is basically the same as the PssmShadowRenderer.
  • Constructor Details

    • SpotLightShadowFilter

      protected SpotLightShadowFilter()
      For serialization only. Do not use.
      See Also:
    • SpotLightShadowFilter

      public SpotLightShadowFilter(AssetManager assetManager, int shadowMapSize)
      Creates a SpotLightShadowFilter.
      Parameters:
      assetManager - the application's asset manager
      shadowMapSize - the size of the rendered shadow maps (512, 1024, 2048, etc...)
  • Method Details

    • getLight

      public SpotLight getLight()
      Returns the light used to cast shadows.
      Returns:
      the SpotLight
    • setLight

      public void setLight(SpotLight light)
      Sets the light to use to cast shadows.
      Parameters:
      light - the SpotLight
    • write

      public void write(JmeExporter ex) throws IOException
      Description copied from class: Filter
      Override this method if you want to save extra properties when the filter is saved else only basic properties of the filter will be saved This method should always begin by super.write(ex);
      Specified by:
      write in interface Savable
      Overrides:
      write in class AbstractShadowFilter<SpotLightShadowRenderer>
      Parameters:
      ex - the exporter (not null)
      Throws:
      IOException - from the exporter
    • read

      public void read(JmeImporter im) throws IOException
      Description copied from class: Filter
      Override this method if you want to load extra properties when the filter is loaded else only basic properties of the filter will be loaded This method should always begin by super.read(im);
      Specified by:
      read in interface Savable
      Overrides:
      read in class AbstractShadowFilter<SpotLightShadowRenderer>
      Throws:
      IOException