While we're waiting for FBO / off-screen rendering support, here's a dead-easy fake Depth-Of-Field solution for sprite based games ( among other things ). It's not perfect, but it is blazing fast. Requires a mipmapped texture.
Very nice. I guess the bitmap-animation is done with a large texture containing all animation frames and then modifying texture coordinates? And I like the image, is it from some game or tv-show?
The sprites are "borrowed" from the game Waku Waku 7 by Sunsoft And yes, all animation frames are in the same texture .. that's the standard way of doing such a thing afaik.
is the effect very subtle? Not sure i'm seeing it,. or its working here.
Sprites do look nice in gl,. perhaps a 'sprite game-setup sample/tutorial' would help those kids what want to do that type of thing,. I will try to make one later but I am working on a bunch of stuff currently,.
i don't see it either, but i'm rather certain it's because my graphics card does not support gl-shaders :(
@jph: zge reports unsupported shaders in the log on startup, maybe it's the same for you?
I might have screwed up somewhere in the Mauru example. Since the mip-mapping happens automatically depending on the projection distance, you need to counter that do pull of a nice smooth DOF gradation. So the shader I used there was a little more elaborate then in the source example provided in my previous post.
I didn't save the Mauru zgeproj though, so I can't check either
K
Edit: Typo
Last edited by Kjell on Thu Sep 03, 2009 2:08 pm, edited 1 time in total.