I found a bug(as i assume) with frustrum and post processors. If I run a postrocessor(simpleWater for example) and I if see entire scene on the screen, so there will be no frustrum after my scene will be visible on a screen.
I have a bug with the SimpleWater PostProcessor.
But i have no bug with @tone0neg’s SSAO(filter) and this Cartoon filter(PostProcessor):
If I don’t see any objects I have ~750 triangle count. If i will see entire scene (240000 * 2 (post effect)) and then rotate the camera to empty space again , so there will be always 240 000 triangle count. Even if i dont see any object.
@Momoko_Fan said: @mifth: Is the problem also present with the Post Water filter?
I cannot see anything that would cause this issue in code. These filters use the same rendering path, just a different camera setup.
Ok, i found the rotation where i have an issue:
http://www.youtube.com/watch?v=9RYS4fC4Vrk&feature=youtu.be
I have 948 Triangles on one side and 2998 Triangles from other side of rotation. Is this an issue?
Just paste this code to TestSimpleWater.java to get the same scene:
[java]
for (int i=0; i<100; i++) {
Geometry geo = geom.clone(false);
geo.move(2f*i+1f, 0, 0);
sceneNode.attachChild(geo);
}
[/java]
I am guessing that extra object was seen on the stats but not in the simple water passes because we are using the Camera.setClipPlane() method. It alters the projection matrix such that objects outside of the plane are not rendered, but the planes of the camera that are used for frustum culling are not modified, therefore, frustum culling is incorrect when the camera clip plane is used.