Filters : fixed depth buffer rendering for additionnal passes

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8176 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
rem..om 14 years ago
parent 90a7917e1a
commit 29dbdc08a4
  1. 8
      engine/src/core/com/jme3/post/Filter.java

@ -102,21 +102,23 @@ public abstract class Filter implements Savable {
if (numSamples > 1 && caps.contains(Caps.FrameBufferMultisample) && caps.contains(Caps.OpenGL31)) {
renderFrameBuffer = new FrameBuffer(width, height, numSamples);
renderedTexture = new Texture2D(width, height, numSamples, textureFormat);
if(renderDepth){
renderFrameBuffer.setDepthBuffer(depthBufferFormat);
if (renderDepth) {
depthTexture = new Texture2D(width, height, numSamples, depthBufferFormat);
renderFrameBuffer.setDepthTexture(depthTexture);
}
} else {
renderFrameBuffer = new FrameBuffer(width, height, 1);
renderedTexture = new Texture2D(width, height, textureFormat);
if(renderDepth){
renderFrameBuffer.setDepthBuffer(depthBufferFormat);
if (renderDepth) {
depthTexture = new Texture2D(width, height, depthBufferFormat);
renderFrameBuffer.setDepthTexture(depthTexture);
}
}
renderFrameBuffer.setColorTexture(renderedTexture);
renderFrameBuffer.setDepthBuffer(depthBufferFormat);
}

Loading…
Cancel
Save