|
|
@ -853,10 +853,13 @@ public class WaterFilter extends Filter { |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void setReflectionMapSize(int reflectionMapSize) { |
|
|
|
public void setReflectionMapSize(int reflectionMapSize) { |
|
|
|
this.reflectionMapSize = reflectionMapSize; |
|
|
|
this.reflectionMapSize = reflectionMapSize; |
|
|
|
reflectionPass.init(renderManager.getRenderer(), reflectionMapSize, reflectionMapSize, Format.RGBA8, Format.Depth); |
|
|
|
//if reflection pass is already initialized we must update it
|
|
|
|
reflectionCam.resize(reflectionMapSize, reflectionMapSize, true); |
|
|
|
if(reflectionPass != null){ |
|
|
|
reflectionProcessor.setReflectionBuffer(reflectionPass.getRenderFrameBuffer()); |
|
|
|
reflectionPass.init(renderManager.getRenderer(), reflectionMapSize, reflectionMapSize, Format.RGBA8, Format.Depth); |
|
|
|
material.setTexture("ReflectionMap", reflectionPass.getRenderedTexture()); |
|
|
|
reflectionCam.resize(reflectionMapSize, reflectionMapSize, true); |
|
|
|
|
|
|
|
reflectionProcessor.setReflectionBuffer(reflectionPass.getRenderFrameBuffer()); |
|
|
|
|
|
|
|
material.setTexture("ReflectionMap", reflectionPass.getRenderedTexture()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|