Codota Logo
PssmShadowRenderer
Code IndexAdd Codota to your IDE (free)

How to use
PssmShadowRenderer
in
com.jme3.shadow

Best Java code snippets using com.jme3.shadow.PssmShadowRenderer (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * sets the shadow compare mode see {@link CompareMode} for more info
 * @param compareMode 
 */
final public void setCompareMode(CompareMode compareMode) {
  pssmRenderer.setCompareMode(compareMode);
}

origin: jMonkeyEngine/jmonkeyengine

/**
 * Sets the filtering mode for shadow edges see {@link FilterMode} for more info
 * @param filterMode 
 */
final public void setFilterMode(FilterMode filterMode) {
  pssmRenderer.setFilterMode(filterMode);
}

origin: jMonkeyEngine/jmonkeyengine

/**
 * Set the shadowIntensity, the value should be between 0 and 1,
 * a 0 value gives a bright and invisible shadow,
 * a 1 value gives a pitch black shadow,
 * default is 0.7
 * @param shadowIntensity the darkness of the shadow
 */
final public void setShadowIntensity(float shadowIntensity) {
  pssmRenderer.setShadowIntensity(shadowIntensity);
}
origin: jMonkeyEngine/jmonkeyengine

setCompareMode(CompareMode.Hardware);
setFilterMode(FilterMode.Bilinear);
setShadowIntensity(0.7f);
origin: jMonkeyEngine/jmonkeyengine

public void postFrame(FrameBuffer out) {
  if (debug) {
    displayShadowMap(renderManager.getRenderer());
  }
  if (!noOccluders) {
    //setting params to receiving geometry list
    setMatParams();
    Camera cam = viewPort.getCamera();
    //some materials in the scene does not have a post shadow technique so we're using the fall back material
    if (needsfallBackMaterial) {
      renderManager.setForcedMaterial(postshadowMat);
    }
    //forcing the post shadow technique and render state
    renderManager.setForcedTechnique(postTechniqueName);
    //rendering the post shadow pass
    viewPort.getQueue().renderShadowQueue(lightReceivers, renderManager, cam, true);
    //resetting renderManager settings
    renderManager.setForcedTechnique(null);
    renderManager.setForcedMaterial(null);
    renderManager.setCamera(cam, false);
  }
}
origin: info.projectkyoto/mms-engine

public void postFrame(FrameBuffer out) {
  Camera cam = viewPort.getCamera();
  if (!noOccluders) {
    postshadowMat.setColor("Splits", splits);
    for (int i = 0; i < nbSplits; i++) {
      postshadowMat.setMatrix4("LightViewProjectionMatrix" + i, lightViewProjectionsMatrices[i]);
    }
    renderManager.setForcedMaterial(postshadowMat);
    viewPort.getQueue().renderShadowQueue(ShadowMode.Receive, renderManager, cam, flushQueues);
    renderManager.setForcedMaterial(null);
    renderManager.setCamera(cam, false);
  }
  if (debug) {
    displayShadowMap(renderManager.getRenderer());
  }
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * returns the edges thickness <br>
 * @see #setEdgesThickness(int edgesThickness)
 * @return edgesThickness
 */
public int getEdgesThickness() {
  return pssmRenderer.getEdgesThickness();
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * returns the lambda parameter
 * @see #setLambda(float lambda)
 * @return lambda
 */
public float getLambda() {
  return pssmRenderer.getLambda();
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * returns the shadow intensity
 * @see #setShadowIntensity(float shadowIntensity)
 * @return shadowIntensity
 */
public float getShadowIntensity() {
  return pssmRenderer.getShadowIntensity();
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * returns the light direction used by the processor
 * @return 
 */
public Vector3f getDirection() {
  return pssmRenderer.getDirection();
}
origin: jMonkeyEngine/jmonkeyengine

/**
 * Creates a PSSM Shadow Filter 
 * More info on the technique at <a href="http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html">http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html</a>
 * @param manager the application asset manager
 * @param size the size of the rendered shadowmaps (512,1024,2048, etc...)
 * @param nbSplits the number of shadow maps rendered (the more shadow maps the more quality, the less fps). 
 */
public PssmShadowFilter(AssetManager manager, int size, int nbSplits) {
  super("Post Shadow");
  material = new Material(manager, "Common/MatDefs/Shadow/PostShadowFilter.j3md");
  pssmRenderer = new PssmShadowRenderer(manager, size, nbSplits, material);
  pssmRenderer.needsfallBackMaterial = true;
}
origin: jMonkeyEngine/jmonkeyengine

((Node) viewPort.getScenes().get(0)).attachChild(createFrustum(points, i));
ShadowUtil.updateFrustumPoints2(shadowCam, points);
((Node) viewPort.getScenes().get(0)).attachChild(createFrustum(points, i));
origin: info.projectkyoto/mms-engine

setCompareMode(CompareMode.Hardware);
setFilterMode(FilterMode.Bilinear);
setShadowIntensity(0.7f);
origin: org.jmonkeyengine/jme3-core

public void postFrame(FrameBuffer out) {
  if (debug) {
    displayShadowMap(renderManager.getRenderer());
  }
  if (!noOccluders) {
    //setting params to receiving geometry list
    setMatParams();
    Camera cam = viewPort.getCamera();
    //some materials in the scene does not have a post shadow technique so we're using the fall back material
    if (needsfallBackMaterial) {
      renderManager.setForcedMaterial(postshadowMat);
    }
    //forcing the post shadow technique and render state
    renderManager.setForcedTechnique(postTechniqueName);
    //rendering the post shadow pass
    viewPort.getQueue().renderShadowQueue(lightReceivers, renderManager, cam, true);
    //resetting renderManager settings
    renderManager.setForcedTechnique(null);
    renderManager.setForcedMaterial(null);
    renderManager.setCamera(cam, false);
  }
}
origin: org.jmonkeyengine/jme3-core

/**
 * returns the edges thickness <br>
 * @see #setEdgesThickness(int edgesThickness)
 * @return edgesThickness
 */
public int getEdgesThickness() {
  return pssmRenderer.getEdgesThickness();
}
origin: org.jmonkeyengine/jme3-core

/**
 * returns the lambda parameter
 * @see #setLambda(float lambda)
 * @return lambda
 */
public float getLambda() {
  return pssmRenderer.getLambda();
}
origin: org.jmonkeyengine/jme3-core

/**
 * returns the shadow intensity
 * @see #setShadowIntensity(float shadowIntensity)
 * @return shadowIntensity
 */
public float getShadowIntensity() {
  return pssmRenderer.getShadowIntensity();
}
origin: org.jmonkeyengine/jme3-core

/**
 * returns the light direction used by the processor
 * @return 
 */
public Vector3f getDirection() {
  return pssmRenderer.getDirection();
}
origin: org.jmonkeyengine/jme3-core

/**
 * Creates a PSSM Shadow Filter 
 * More info on the technique at <a href="http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html">http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html</a>
 * @param manager the application asset manager
 * @param size the size of the rendered shadowmaps (512,1024,2048, etc...)
 * @param nbSplits the number of shadow maps rendered (the more shadow maps the more quality, the less fps). 
 */
public PssmShadowFilter(AssetManager manager, int size, int nbSplits) {
  super("Post Shadow");
  material = new Material(manager, "Common/MatDefs/Shadow/PostShadowFilter.j3md");
  pssmRenderer = new PssmShadowRenderer(manager, size, nbSplits, material);
  pssmRenderer.needsfallBackMaterial = true;
}
origin: org.jmonkeyengine/jme3-core

((Node) viewPort.getScenes().get(0)).attachChild(createFrustum(points, i));
ShadowUtil.updateFrustumPoints2(shadowCam, points);
((Node) viewPort.getScenes().get(0)).attachChild(createFrustum(points, i));
com.jme3.shadowPssmShadowRenderer

Javadoc

PssmShadow renderer use Parallel Split Shadow Mapping technique (pssm)
It splits the view frustum in several parts and compute a shadow map for each one.
splits are distributed so that the closer they are from the camera, the smaller they are to maximize the resolution used of the shadow map.
This results in a better quality shadow than standard shadow mapping.
for more informations on this read this http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html

Most used methods

  • displayShadowMap
  • setCompareMode
    sets the shadow compare mode see CompareMode for more info
  • setFilterMode
    Sets the filtering mode for shadow edges see FilterMode for more info
  • setShadowIntensity
    Set the shadowIntensity, the value should be between 0 and 1, a 0 value gives a bright and invisible
  • <init>
    Create a PSSM Shadow Renderer More info on the technique at http://http.developer.nvidia.com/GPUGem
  • createFrustum
  • getDirection
    returns the light direction used by the processor
  • getEdgesThickness
    returns the edges thickness
  • getLambda
    returns the lambda parameter see #setLambda(float lambda)
  • getShadowIntensity
    returns the shadow intensity
  • getShadowZExtend
    How far the shadows are rendered in the view
  • getShadowZFadeLength
    get the length over which the shadow will fade out when using a shadowZextend
  • getShadowZExtend,
  • getShadowZFadeLength,
  • initialize,
  • isFlushQueues,
  • postQueue,
  • preFrame,
  • setDirection,
  • setEdgesThickness,
  • setFlushQueues,
  • setLambda

Popular in Java

  • Finding current android device location
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now