Package com.jme3.shadow
Class SdsmFitter
java.lang.Object
com.jme3.shadow.SdsmFitter
Compute shader used in SDSM.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classParameters used for a fit operation.static classBounds for a single cascade split in light space.static classComplete fit result for all cascades.static classResult of a fit operation, including parameters and computed fit.static classInformation about where a cascade split starts/ends for blending. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Cleans up GPU resources.voidfit(Texture depthTexture, int splitCount, Matrix4f cameraToLight, float cameraNear, float cameraFar) Initiates an asynchronous fit operation on the given depth texture.getResult(boolean wait) Gets the next available fit result.voidsetMaxFrameLag(int maxFrameLag)
-
Constructor Details
-
SdsmFitter
-
-
Method Details
-
fit
public void fit(Texture depthTexture, int splitCount, Matrix4f cameraToLight, float cameraNear, float cameraFar) Initiates an asynchronous fit operation on the given depth texture.- Parameters:
depthTexture- the depth texture to analyzesplitCount- number of cascade splits (1-4)cameraToLight- transformation matrix from camera clip space to light view spacecameraNear- camera near plane distancecameraFar- camera far plane distance
-
getResult
Gets the next available fit result.- Parameters:
wait- if true, blocks until a result is available- Returns:
- the fit result, or null if none available (and wait is false)
-
cleanup
public void cleanup()Cleans up GPU resources. -
setMaxFrameLag
public void setMaxFrameLag(int maxFrameLag)
-