debugQuadsNode = new Node( "quadNode" );
debugQuadsNode.setCullMode( SceneElement.CULL_NEVER );
float quadWidth = display.getWidth() / 8;
float quadHeight = display.getWidth() / 8;
Quad debugQuad = new Quad( "reflectionQuad", quadWidth, quadHeight );
debugQuad.setRenderQueueMode( Renderer.QUEUE_ORTHO );
debugQuad.setCullMode( SceneElement.CULL_NEVER );
debugQuad.setLightCombineMode( LightState.OFF );
TextureState ts = display.getRenderer().createTextureState();
ts.setTexture( waterEffectRenderPass.getTextureReflect() );
debugQuad.setRenderState( ts );
debugQuad.updateRenderState();
debugQuad.getLocalTranslation().set( quadWidth * 0.6f, quadHeight * 1.0f, 1.0f );
debugQuadsNode.attachChild( debugQuad );
if( waterEffectRenderPass.getTextureRefract() != null ) {
debugQuad = new Quad( "refractionQuad", quadWidth, quadHeight );
debugQuad.setRenderQueueMode( Renderer.QUEUE_ORTHO );
debugQuad.setCullMode( SceneElement.CULL_NEVER );
debugQuad.setLightCombineMode( LightState.OFF );
ts = display.getRenderer().createTextureState();
ts.setTexture( waterEffectRenderPass.getTextureRefract() );
debugQuad.setRenderState( ts );
debugQuad.updateRenderState();
debugQuad.getLocalTranslation().set( quadWidth * 0.6f, quadHeight * 2.1f, 1.0f );
debugQuadsNode.attachChild( debugQuad );
}
if( waterEffectRenderPass.getTextureDepth() != null ) {
debugQuad = new Quad( "refractionQuad", quadWidth, quadHeight );
debugQuad.setRenderQueueMode( Renderer.QUEUE_ORTHO );
debugQuad.setCullMode( SceneElement.CULL_NEVER );
debugQuad.setLightCombineMode( LightState.OFF );
ts = display.getRenderer().createTextureState();
ts.setTexture( waterEffectRenderPass.getTextureDepth() );
debugQuad.setRenderState( ts );
debugQuad.updateRenderState();
debugQuad.getLocalTranslation().set( quadWidth * 0.6f, quadHeight * 3.2f, 1.0f );
debugQuadsNode.attachChild( debugQuad );
}
}