Wednesday, February 9, 2011

Overlay Bittersweets

So I implemented the overlay system described previously.  On the up side, I'm now rendering the water effect at about 35 FPS as opposed to my previous ~27 FPS.  Although the native code was refactored somewhat I'm pretty certain the gain comes from using a separate thread.  While the GPU is rendering the scene I'm busy preparing the next frame of water.  Sweet!

The bitter part is that as soon as I add another layer on top of the water, performance drops drastically (~10 FPS for my test case).  There's no way I can render fog on top of water with this system.  It's too slow to do all this image compositing on the CPU.  I need to leverage the GPU...

I've decided that the technology demo will have to ship without the fog effect.  When I come back to this problem I'll experiment with making a good looking fog effect using alpha mapped OpenGL textures.

No comments:

Post a Comment