Package postprocess
Class WeightedCombine
java.lang.Object
postprocess.PostProcessStep
postprocess.WeightedCombine
A Post Processing Step that combines two textures multiplying them
with corresponding weights and then adding them
-
Nested Class Summary
Nested classes/interfaces inherited from class postprocess.PostProcessStep
PostProcessStep.Target
-
Field Summary
Fields inherited from class postprocess.PostProcessStep
framebuffer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate the shader to be used for this stepvoid
prepare()
Prepare the framebuffer by clearing it and binding any textures requiredvoid
setTextureA
(Texture texture) Set the input texture A's idvoid
setTextureB
(Texture texture) Set the input texture B's idvoid
setWeightA
(float weightA) Set the input texture A's weightvoid
setWeightB
(float weightB) Set the input texture B's weightprotected void
uploadUniforms
(Shader shader) Upload uniforms to the shaderMethods inherited from class postprocess.PostProcessStep
apply, createFramebuffer, init
-
Constructor Details
-
WeightedCombine
Default Constructor- Parameters:
target
- Where the final texture is to be rendered
-
-
Method Details
-
createShader
Create the shader to be used for this step- Specified by:
createShader
in classPostProcessStep
- Returns:
- the created shader
-
prepare
public void prepare()Prepare the framebuffer by clearing it and binding any textures required- Specified by:
prepare
in classPostProcessStep
-
uploadUniforms
Upload uniforms to the shader- Specified by:
uploadUniforms
in classPostProcessStep
-
setTextureA
Set the input texture A's id- Parameters:
texture
- input texture
-
setTextureB
Set the input texture B's id- Parameters:
texture
- input texture
-
setWeightA
public void setWeightA(float weightA) Set the input texture A's weight- Parameters:
weightA
- input weight
-
setWeightB
public void setWeightB(float weightB) Set the input texture B's weight- Parameters:
weightB
- input weight
-