tags:

views:

533

answers:

2

I'm working on an iPhone game with simple vector graphics and though it would look extra nice if the objects on screen glowed (i.e. had a bloom filter applied to the render).

I'm fairly new to post-processing techniques and most of the tutorials I'm reading utilize shaders on the GPU. I'm just wondering if this is possible on the iPhone hardware, or if it would all have to be done in software (in which case I assume it would be far too slow to use real time).

Thanks, -S

A: 

Since the iPhone doesn't support shaders at all, I think a bloom filter would be very difficult to implement. Some multipass trickery could result in a convincing imitation depending on the scene, but might be too slow.

Also, the game "edge" appears to use a bloom effect on the pause screen, but it's static so it's probably implemented in software.

rpetrich
A: 

This is definitely possible on even es1 devices.

1) Render to texture lit geometry that should bloom as pure white on a black background. For example if the camera is in a room looking at a window and you want the window to bloom - render only the window, without textures, as pure white.

2) Create several copies of this texture each one scaled down to half of the previous size

3) Render all these textures stretched to full screen over the top of your rendered scene using additive blending, adjust the alpha of each layer til you get the quality you're looking for

Essentially what steps 2 and 3 are doing is emulating a gaussian blur in hardware using the native texture filtering.

So what you have is your light source geometry as white on black, gaussian blurred and then added to your scene - voila fake bloom :)

kode80
Love it, thanks
spencewah