|
|
@ -77,6 +77,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable { |
|
|
|
private int originalHeight; |
|
|
|
private int originalHeight; |
|
|
|
private int lastFilterIndex = -1; |
|
|
|
private int lastFilterIndex = -1; |
|
|
|
private boolean cameraInit = false; |
|
|
|
private boolean cameraInit = false; |
|
|
|
|
|
|
|
private boolean clearColor= true; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Create a FilterProcessor |
|
|
|
* Create a FilterProcessor |
|
|
@ -196,7 +197,7 @@ public class FilterPostProcessor implements SceneProcessor, Savable { |
|
|
|
|
|
|
|
|
|
|
|
renderManager.setCamera(filterCam, true); |
|
|
|
renderManager.setCamera(filterCam, true); |
|
|
|
r.setFrameBuffer(buff); |
|
|
|
r.setFrameBuffer(buff); |
|
|
|
r.clearBuffers(false, true, true); |
|
|
|
r.clearBuffers(clearColor, true, true); |
|
|
|
renderManager.renderGeometry(fsQuad); |
|
|
|
renderManager.renderGeometry(fsQuad); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -392,6 +393,16 @@ public class FilterPostProcessor implements SceneProcessor, Savable { |
|
|
|
height = (int) (h * (Math.abs(bottom - top))); |
|
|
|
height = (int) (h * (Math.abs(bottom - top))); |
|
|
|
width = Math.max(1, width); |
|
|
|
width = Math.max(1, width); |
|
|
|
height = Math.max(1, height); |
|
|
|
height = Math.max(1, height); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Testing original versus actual viewport dimension.
|
|
|
|
|
|
|
|
//If they are different we are in a multiview situation and color from other view port must not be cleared.
|
|
|
|
|
|
|
|
//However, not clearing the color can cause issues when AlphaToCoverage is active on the renderer.
|
|
|
|
|
|
|
|
if(originalWidth!=width || originalHeight!=height){ |
|
|
|
|
|
|
|
clearColor = false; |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
clearColor = true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
cam.resize(width, height, false); |
|
|
|
cam.resize(width, height, false); |
|
|
|
cameraInit = true; |
|
|
|
cameraInit = true; |
|
|
|
computeDepth = false; |
|
|
|
computeDepth = false; |
|
|
|