Hello,
I am trying to get blurred background in my android game. The optimized blur image effect gives me what i want, but only on PC. Once i deploy it on mobile the FPS drops drastically.
I have two cameras
First camera renders foreground.
Second camera render background that contains a 3D object and blur image effect is attached to the second camera.
Please help me out. Is there any other way to get blurred background.
This is what i actually want.

I don’t know if this works on mobile but depth of field is what you are looking for.
People generally use DOF for this, but if that’s too slow for your target and your OK with the 2 camera hack, you can do this without the blur effect at all (which is likely what is making everything so slow). Rather, just set the back (blurry) camera to render into a texture which is low res, and draw that texture to the screen before you draw the other camera. That will give you a free blur while reducing your rendering costs for everything in the background.
Thanks for you reply guys,
I got what i wanted by using a custom DOF effect written for mobile devices.
Just being curious,
shouldn’t this work smoothly on mobile devices? Am i doing something wrong which results in drop of FPS?
So, what your doing is rendering the background scene at full frame res. Then, after it’s rendered this nice crisp hi-def scene, your scaling it down by rendering that output into smaller buffers, then scaling it back up again, each time performing a lot of per-pixel operations, which makes it quite costly to render.
What I’m suggesting, if you just want is a simple blur, is to render your scene into a low res target instead. This will actually speed up the rendering of those objects since you won’t need to render them at high res to begin with, and you’ll skip all that work.
Thanks for you suggestion i will look into it.
See here is what i am doing right now.
I have to use two camera
First camera that renders everything and the second camera that renders only the background.
Whenever i apply blur to the second camera the Fps drop to 3 FPS on my device. But if i use only one camera and render all my scene in it and apply Blur image effect on it the result is fine with 60 FPS on device.
Using two cameras is a compulsion for me as i have to apply blur only to the background layer.
Why is this happening? two camera with image effect applied only on one of these reduce FPS on mobile drastically.
I have applied some other cheap image effects specially designed for mobile and i get the same bad performance using two cameras.
Please suggest me something on that issue