Author
Topic: Z-Buffer accessible (Read 3276 times)

Do you know whether it is possible to access the z-Buffer in the jCPT engine? I know that it will probably not be possible when using hardware support as graphic cards usually do not (and physically can not) export it. How about software rendering? I'd like to use it for post-rendering graphical effects.

It's not possible to do this in the current version, i'm afraid. Even in software mode, you would have to deal with the zTrick jPCT can use. I don't think that i'll add a getZBuffer() method to FrameBuffer, but i can imagine to change the int[] that the zBuffer is protected. That way, you could access it, but only by extending FrameBuffer. That makes it clearer, that it's actually a hacky thing to do.Would that help?

I can not promise that it will, but it sounds good and I'd certainly like to try it. I am currently evaluating some other software renderers too, and still have to decide which one to use. But if you'd do me that favor with the zBuffer fleld, I will keep you informed of my progress in hacking the Framebuffer and any possible results.