How to get depthTexture correctly?

Add a System.out.println(depthTexture) inside setDepthTexture method just like I did and we will see if it is null or not:

fogFilter = new FogFilter() {
            @Override
            protected void setDepthTexture(Texture depthTexture) {
                super.setDepthTexture(depthTexture);

                System.out.println("depthTexture=" + depthTexture);
            }
        };