Package com.jme3.shadow
Class DirectionalLightShadowRendererVR
java.lang.Object
com.jme3.shadow.AbstractShadowRendererVR
com.jme3.shadow.DirectionalLightShadowRendererVR
- All Implemented Interfaces:
Savable,SceneProcessor
Deprecated.
The jme3-vr module is deprecated and will be removed in a future version (as it only supports OpenVR).
For new Virtual Reality projects, use user libraries that provide OpenXR support.
See Virtual Reality JME wiki section
for more information.
DirectionalLightShadowRenderer 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 information on this read http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html
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 information on this read http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected floatDeprecated.protected DirectionalLightDeprecated.protected Vector3f[]Deprecated.protected CameraDeprecated.protected ColorRGBADeprecated.protected float[]Deprecated.Fields inherited from class com.jme3.shadow.AbstractShadowRendererVR
assetManager, debug, dispPic, dummyTex, edgeFilteringMode, edgesThickness, fadeInfo, fadeLength, forcedRenderState, frustumCam, lightReceivers, lightViewProjectionsMatrices, matCache, nbShadowMaps, needsfallBackMaterial, postshadowMat, postTechniqueName, preshadowMat, profiler, renderBackFacesShadows, renderManager, shadowCompareMode, shadowFB, shadowIntensity, shadowMapOccluders, shadowMaps, shadowMapSize, skipPostPass, viewPort, zFarOverride -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Used for serialization use DirectionalLightShadowRenderer#DirectionalLightShadowRenderer(AssetManager assetManager, int shadowMapSize, int nbSplits)DirectionalLightShadowRendererVR(AssetManager assetManager, int shadowMapSize, int nbSplits) Deprecated.Creates a DirectionalLight shadow renderer. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckCulling(Camera viewCam) Deprecated.Directional light is always in the view frustumprotected voidclearMaterialParameters(Material material) Deprecated.This method is called once per frame and is responsible for clearing any material parameters that subclasses may need to clear on the post material.protected voiddoDisplayFrustumDebug(int shadowMapIndex) Deprecated.responsible for displaying the frustum of the shadow cam for debug purposefloatDeprecated.returns the lambda parameter see #setLambda(float lambda)getLight()Deprecated.return the light used to cast shadowsprotected GeometryListgetOccludersToRender(int shadowMapIndex, GeometryList shadowMapOccluders) Deprecated.Returns a subclass-specific geometryList containing the occluders to be rendered in the shadow mapprotected voidgetReceivers(GeometryList lightReceivers) Deprecated.protected CameragetShadowCam(int shadowMapIndex) Deprecated.return the shadow camera to use for rendering the shadow map according the given indexprotected voidDeprecated.delegates the initialization of the frustum cam to child renderersbooleanDeprecated.Check if the stabilization is enabled.voidread(JmeImporter im) Deprecated.De-serialize this instance, for example when loading from a J3O file.voidsetEnabledStabilization(boolean stabilize) Deprecated.Enables the stabilization of the shadow's edges.voidsetLambda(float lambda) Deprecated.Adjusts the partition of the shadow extend into shadow maps.voidsetLight(DirectionalLight light) Deprecated.Sets the light to use to cast shadowsprotected voidsetMaterialParameters(Material material) Deprecated.This method is called once per frame and is responsible for setting any material parameters that subclasses may need to set on the post material.protected voidupdateShadowCams(Camera viewCam) Deprecated.Invoked once per frame to update the shadow cams according to the light view.voidwrite(JmeExporter ex) Deprecated.Serialize this instance, for example when saving to a J3O file.Methods inherited from class com.jme3.shadow.AbstractShadowRendererVR
cleanup, createFrustum, displayDebug, displayFrustum, displayShadowMap, getEdgeFilteringMode, getEdgesThickness, getPreShadowForcedRenderState, getShadowCompareMode, getShadowIntensity, getShadowZExtend, getShadowZFadeLength, initForcedRenderState, initialize, isFlushQueues, isInitialized, isRenderBackFacesShadows, postFrame, postQueue, preFrame, renderShadowMap, reshape, setEdgeFilteringMode, setEdgesThickness, setPostShadowMaterial, setPostShadowParams, setProfiler, setRenderBackFacesShadows, setShadowCompareMode, setShadowIntensity, setShadowZExtend, setShadowZFadeLengthMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jme3.post.SceneProcessor
rescale
-
Field Details
-
lambda
protected float lambdaDeprecated. -
shadowCam
Deprecated. -
splits
Deprecated. -
splitsArray
protected float[] splitsArrayDeprecated. -
light
Deprecated. -
points
Deprecated.
-
-
Constructor Details
-
DirectionalLightShadowRendererVR
public DirectionalLightShadowRendererVR()Deprecated.Used for serialization use DirectionalLightShadowRenderer#DirectionalLightShadowRenderer(AssetManager assetManager, int shadowMapSize, int nbSplits) -
DirectionalLightShadowRendererVR
Deprecated.Creates a DirectionalLight shadow renderer. More info on the technique at http://http.developer.nvidia.com/GPUGems3/gpugems3_ch10.html- Parameters:
assetManager- the application's asset managershadowMapSize- the size of the rendered shadowmaps (512, 1024, 2048, etcetera)nbSplits- the number of shadow maps rendered (More shadow maps yield better quality, fewer fps.)
-
-
Method Details
-
initFrustumCam
protected void initFrustumCam()Deprecated.Description copied from class:AbstractShadowRendererVRdelegates the initialization of the frustum cam to child renderers- Specified by:
initFrustumCamin classAbstractShadowRendererVR
-
getLight
Deprecated.return the light used to cast shadows- Returns:
- the DirectionalLight
-
setLight
Deprecated.Sets the light to use to cast shadows- Parameters:
light- a DirectionalLight
-
updateShadowCams
Deprecated.Description copied from class:AbstractShadowRendererVRInvoked once per frame to update the shadow cams according to the light view.- Specified by:
updateShadowCamsin classAbstractShadowRendererVR- Parameters:
viewCam- the scene cam
-
getOccludersToRender
Deprecated.Description copied from class:AbstractShadowRendererVRReturns a subclass-specific geometryList containing the occluders to be rendered in the shadow map- Specified by:
getOccludersToRenderin classAbstractShadowRendererVR- Parameters:
shadowMapIndex- the index of the shadow map being renderedshadowMapOccluders- the list of occluders- Returns:
- a list of occluders
-
getReceivers
Deprecated.- Specified by:
getReceiversin classAbstractShadowRendererVR
-
getShadowCam
Deprecated.Description copied from class:AbstractShadowRendererVRreturn the shadow camera to use for rendering the shadow map according the given index- Specified by:
getShadowCamin classAbstractShadowRendererVR- Parameters:
shadowMapIndex- the index of the shadow map being rendered- Returns:
- the shadowCam
-
doDisplayFrustumDebug
protected void doDisplayFrustumDebug(int shadowMapIndex) Deprecated.Description copied from class:AbstractShadowRendererVRresponsible for displaying the frustum of the shadow cam for debug purpose- Overrides:
doDisplayFrustumDebugin classAbstractShadowRendererVR
-
setMaterialParameters
Deprecated.Description copied from class:AbstractShadowRendererVRThis method is called once per frame and is responsible for setting any material parameters that subclasses may need to set on the post material.- Specified by:
setMaterialParametersin classAbstractShadowRendererVR- Parameters:
material- the material to use for the post shadow pass
-
clearMaterialParameters
Deprecated.Description copied from class:AbstractShadowRendererVRThis method is called once per frame and is responsible for clearing any material parameters that subclasses may need to clear on the post material.- Specified by:
clearMaterialParametersin classAbstractShadowRendererVR- Parameters:
material- the material that was used for the post shadow pass
-
getLambda
public float getLambda()Deprecated.returns the lambda parameter see #setLambda(float lambda)- Returns:
- lambda
-
setLambda
public void setLambda(float lambda) Deprecated.Adjusts the partition of the shadow extend into shadow maps. Lambda is usually between 0 and 1. A low value gives a more linear partition, resulting in consistent shadow quality over the extend, but near shadows could look very jagged. A high value gives a more logarithmic partition, resulting in high quality for near shadows, but quality decreases rapidly with distance. The default value is 0.65 (the theoretical optimum).- Parameters:
lambda- the lambda value.
-
isEnabledStabilization
public boolean isEnabledStabilization()Deprecated.Check if the stabilization is enabled.- Returns:
trueif stabilization is enabled andfalseotherwise.
-
setEnabledStabilization
public void setEnabledStabilization(boolean stabilize) Deprecated.Enables the stabilization of the shadow's edges. (default is true) This prevents shadow edges from flickering when the camera moves. However, it can lead to some loss of shadow quality in particular scenes.- Parameters:
stabilize-trueif stabilization has to be enabled andfalseotherwise.
-
read
Deprecated.Description copied from class:AbstractShadowRendererVRDe-serialize this instance, for example when loading from a J3O file.- Specified by:
readin interfaceSavable- Overrides:
readin classAbstractShadowRendererVR- Parameters:
im- importer (not null)- Throws:
IOException
-
write
Deprecated.Description copied from class:AbstractShadowRendererVRSerialize this instance, for example when saving to a J3O file.- Specified by:
writein interfaceSavable- Overrides:
writein classAbstractShadowRendererVR- Parameters:
ex- exporter (not null)- Throws:
IOException
-
checkCulling
Deprecated.Directional light is always in the view frustum- Specified by:
checkCullingin classAbstractShadowRendererVR- Parameters:
viewCam-- Returns:
- true
-