Actually, I don't think it's related to z-sorting.
Here's some example code. The spere resolution is set to something low to make the issue more apparent. Anyone want to give it a try and tell me if you see the same thing?
- float cameraAngle;
- float cameraAngleInc;
- PShape sphere;
- void setup() {
- size(400,400,P3D);
- smooth(8);
- noStroke();
- sphereDetail(10,10);
- sphere = createShape(SPHERE, 150);
- cameraAngle = 0;
- cameraAngleInc = TWO_PI/600;
- }
- void draw() {
- cameraAngle += cameraAngleInc;
- camera(500*cos(cameraAngle),300,500*sin(cameraAngle),0,0,0,0,-1,0);
- directionalLight(204,204,204,0,-1,0);
- ambientLight(24,24,24);
- background(0);
- shape(sphere);
- }
- void keyPressed() {
- saveFrame("frame_####.png");
- }