Could you explain how the int array FrameBuffer.getPixels() is structured?
I'm having a hard time understanding how it works when oversampling. In normal mode I can simple access it in my software shader and everything works as expected. When using oversampling the pixels are "distorted" and I can not predict which pixel I am accessing. Let me clarify that a bit.
(click to enlarge)So with normal sampling there is a one to one map from the zBuffer to the getPixels() buffer. With oversampling I was expecting a 4 -> 1 map, but that is not the case. In the "Oversampling" example in the picture I'm using a 2 -> 1 map (i.e. pixels[c/2] = zBuffer[c]). I can not figure out how to do it correctly and have already spent way to much time on it.
So my question is: How do the zBuffer and the getPixels() array relate when using oversampling?
Edit: This is what I get when using a 4->1 mapping.
(click to enlarge)