Built-In Image Effects and Android

Straight to the point: despite promising claims stated in this article I am unable to use the Optimized Blur and Bloom effects on Android. The only feedback I get states that: “The shader Hidden/FastBlur (UnityEngine.Shader) on effect BlurCamera (UnityStandardAssets.ImageEffects.BlurOptimized) is not supported on this platform!”. I suppose (or maybe I’m wrong) that hardware is not the issue, it’s been tested on Sony Xperia C5303 with Adreno 320 GPU on board supporting OpenGL ES 3.0. I looked throughout the entire web looking for a solution and skyrocketed everything in the quality panel in my desperate attempts to make my game look pretty again.

Was it all in vain?

1 Like

You should probably forget about full screen effects for mobile platforms for now. The overdraw of it alone is usually too much for mobile devices.

Solved it, apparently using constant arrays in shaders crashes the compiler on Adreno 3xx devices.

1 Like

How did you solve it? I’m messing around with Bloom on my LG Nexus 5, just for funsies and the BloomOptimized script is being disabled.

I see the static const arrays of blur weights in there. But I’m not sure how to untangle them from the rest of the shader. Any tips?

Simply remove the const keyword and it should work correctly. I’m not sure what the performance implications are from the array not being constant, although it works like a charm on my Xperia SP.

3 Likes

Thank you, I misread your solution as the arrays themselves being an issue :slight_smile: Not their const keyword. Seems to work for me as well.

Thanks a lot! You just saved me lot of time. Removed the const keyword for the array and made them fixed and it’s working as expected. I thought it was an optimized shader, why would they declare those arrays as half s?

I just want to say thank you. You saved my day.

Thanks a bunch for this. Exactly what I needed.

Thank you, Goric!

Thanx Goric! The blur was working on my Xperia M2, but it had an awful performance. (I think the issue was because I was interpolating the blur size to give it some ease effect), however, removing the const keywords fixed the problem entirely.

Sorry, I don’t get it. What exactly did you changed?

Unfortunately, removing the 2 “const” qualifiers from MobileBloom.shader does not solve my problem here on Nexus 5.

The Bloom Optimized effect itself is good, but it conflicts with the Unity UI if the canvas uses Screen Space - Camera. <---- Due to UI camera Clear Flag > Don’t Clear.