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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate the shader to be used for this stepvoidprepare()Prepare the framebuffer by clearing it and binding any textures requiredvoidsetTextureA(Texture texture) Set the input texture A's idvoidsetTextureB(Texture texture) Set the input texture B's idvoidsetWeightA(float weightA) Set the input texture A's weightvoidsetWeightB(float weightB) Set the input texture B's weightprotected voiduploadUniforms(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:
createShaderin classPostProcessStep- Returns:
- the created shader
-
prepare
public void prepare()Prepare the framebuffer by clearing it and binding any textures required- Specified by:
preparein classPostProcessStep
-
uploadUniforms
Upload uniforms to the shader- Specified by:
uploadUniformsin 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
-