Package com.jme3.environment.generation
Class PrefilteredEnvMapFaceGenerator
java.lang.Object
com.jme3.environment.generation.RunnableWithProgress
com.jme3.environment.generation.PrefilteredEnvMapFaceGenerator
- All Implemented Interfaces:
- Runnable
Generates one face of the prefiltered environment map for PBR. This job can
 be launched from a separate thread.
 
TODO there is a lot of duplicate code here with the EnvMapUtils.
- 
Field SummaryFields inherited from class com.jme3.environment.generation.RunnableWithProgresslistener
- 
Constructor SummaryConstructorsConstructorDescriptionPrefilteredEnvMapFaceGenerator(Application app, int face, JobProgressListener<Integer> listener) Creates a pem generator for the given face.
- 
Method SummaryModifier and TypeMethodDescriptionimportanceSampleGGX(Vector4f xi, float a2, Vector3f store) Computes GGX half vector in local spacevoidrun()voidsetGenerationParam(TextureCubeMap sourceMap, int targetMapSize, EnvMapUtils.FixSeamsMethod fixSeamsMethod, EnvMapUtils.GenerationType genType, TextureCubeMap store) Fills all the generation parametersMethods inherited from class com.jme3.environment.generation.RunnableWithProgressgetProgress, progress, reset, setEnd
- 
Constructor Details- 
PrefilteredEnvMapFaceGeneratorpublic PrefilteredEnvMapFaceGenerator(Application app, int face, JobProgressListener<Integer> listener) Creates a pem generator for the given face. The app is needed to enqueue the call to the EnvironmentCamera when the generation is done, so that this process is thread safe.- Parameters:
- app- the Application
- face- the face to generate
- listener- to monitor progress (alias created)
 
 
- 
- 
Method Details- 
setGenerationParampublic void setGenerationParam(TextureCubeMap sourceMap, int targetMapSize, EnvMapUtils.FixSeamsMethod fixSeamsMethod, EnvMapUtils.GenerationType genType, TextureCubeMap store) Fills all the generation parameters- Parameters:
- sourceMap- the source cube map
- targetMapSize- the size of the generated map (width or height in pixel)
- fixSeamsMethod- the method used to fix seams as described in- EnvMapUtils.FixSeamsMethod
- genType- select Fast or HighQuality
- store- The cube map to store the result in.
 
- 
runpublic void run()
- 
importanceSampleGGXComputes GGX half vector in local space- Parameters:
- xi- (not null)
- a2- fourth power of roughness
- store- caller-provided storage
- Returns:
- either store or a new vector (not null)
 
 
-