com.jmex.effects.glsl
Class SketchRenderPass

java.lang.Object
  extended by com.jme.renderer.pass.Pass
      extended by com.jmex.effects.glsl.SketchRenderPass
All Implemented Interfaces:
java.io.Serializable

public class SketchRenderPass
extends Pass

GLSL sketch effect pass. - Render supplied source to a texture - Render normals and depth to texture - Apply sobel filter to find changes is normal and depth - (Blur if wanted, slow) - Overwrite or blend with first pass

Author:
Rikard Herlitz (MrCoder)
See Also:
Serialized Form

Field Summary
protected static LightState noLights
           
protected static MaterialState noMaterials
           
protected static TextureState noTexture
           
protected  RenderState[] preStates
           
 
Fields inherited from class com.jme.renderer.pass.Pass
context, enabled, passStates, savedStates, spatials, zFactor, zOffset
 
Constructor Summary
SketchRenderPass(Camera cam, int renderScale)
           
 
Method Summary
 void cleanup()
          Release pbuffers in TextureRenderer's.
 void doRender(Renderer r)
           
 float getDepthMult()
           
 float getNormalMult()
           
 float getOff()
           
 boolean isSupported()
           
protected  void replaceEnforcedStates()
          replaces any states enforced by the user at the end of the pass.
 void resetParameters()
          Reset sketch parameters to default
protected  void saveEnforcedStates()
          saves any states enforced by the user for replacement at the end of the pass.
 void setDepthMult(float depthMult)
           
 void setNormalMult(float normalMult)
           
 void setOff(float off)
           
 
Methods inherited from class com.jme.renderer.pass.Pass
add, applyPassStates, cleanUp, clearPassState, clearPassState, clearPassStates, contains, doUpdate, get, getRenderState, getRenderState, getZFactor, getZOffset, isEnabled, remove, removeAll, renderPass, resetOldStates, setEnabled, setPassState, setZFactor, setZOffset, size, updatePass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

preStates

protected RenderState[] preStates

noTexture

protected static TextureState noTexture

noLights

protected static LightState noLights

noMaterials

protected static MaterialState noMaterials
Constructor Detail

SketchRenderPass

public SketchRenderPass(Camera cam,
                        int renderScale)
Method Detail

resetParameters

public void resetParameters()
Reset sketch parameters to default


cleanup

public void cleanup()
Release pbuffers in TextureRenderer's. Preferably called from user cleanup method.


isSupported

public boolean isSupported()

doRender

public void doRender(Renderer r)
Specified by:
doRender in class Pass

saveEnforcedStates

protected void saveEnforcedStates()
saves any states enforced by the user for replacement at the end of the pass.


replaceEnforcedStates

protected void replaceEnforcedStates()
replaces any states enforced by the user at the end of the pass.


getNormalMult

public float getNormalMult()

setNormalMult

public void setNormalMult(float normalMult)

getDepthMult

public float getDepthMult()

setDepthMult

public void setDepthMult(float depthMult)

getOff

public float getOff()

setOff

public void setOff(float off)