I took a quick look in the source. To configure the CanvasPeer to draw the render passes on top of each other, you have to call
// clear the buffer...
canvasPeer.setDisableClearBuffer(false);
// ...but specify, that depth-buffer clearing is not necessary
canvasPeer.setFullOverpaint(true);
The MultiPassView however only calls the first in it’s prepareRenderOnce() method:
// MultiPassView:195 ...
prepareRenderOnce(RenderPass pass, boolean forceClearBuffer, boolean forceSwapBuffers, Canvas3D canvas3D)
{
// (...)
if (canvas3D.get3DPeer() instanceof com.xith3d.render.jsr231.CanvasPeerImpl)
{
com.xith3d.render.jsr231.CanvasPeerImpl canvasPeerImpl = (com.xith3d.render.jsr231.CanvasPeerImpl)(canvas3D.get3DPeer());
// set clear buffer state
canvasPeerImpl.setDisableClearBuffer(!forceClearBuffer);
// set force swap state
canvasPeerImpl.setForceNoSwap(!forceSwapBuffers);
}
else if (canvas3D.get3DPeer() instanceof com.xith3d.render.lwjgl.CanvasPeerImpl)
{
com.xith3d.render.lwjgl.CanvasPeerImpl canvasPeerImpl = (com.xith3d.render.lwjgl.CanvasPeerImpl)(canvas3D.get3DPeer());
// set clear buffer state
canvasPeerImpl.setDisableClearBuffer(forceClearBuffer);
// set force swap state
//canvasPeerImpl.setForceNoSwap(!forceSwapBuffers);
}
}
which results in either no clearing at all or full clearing including the color buffer.
So to solve this, a new property - named “layered” for example - should be added to MultiPassView. If this is set to true, the two canvasPeer-properties should be set like the code at the top of this post for all render passes but the first one.
I’ll try this tomorrow, maybe