iOS 7 Translucency in Codea

I really would like to add the blur effect found across iOS 7 and 8 to my project in Codea, but I don’t even know if it is possible in Codea. I am not looking to just decrease the transparency, but to actually blur the background. I would like to add this as my gameover screen, and have the screen appear blurred like there is something over it.

Here is a link of a photo for those who don’t know what I’m referring to:

http://9to5mac.files.wordpress.com/2014/03/notification-center.png?w=704&h=479

There’s a “Blur” shader in Shader Lab → Filters → Blur, if that’s what you’re looking for. There’s also a “Shaders” example to show how to use meshes and shaders (including the Blur shader).

@SkyTheCoder - It’s more than a blur… Much more. Also, to do something like this in Codea would be way too slow. If you need a simple overlay, I suggest using a native app. Basically, have the main Codea frame, then add another Codea frame with a transparent background inside as UIVisualEffectView with a UIVibrancyEffect of dark. Don’t worry if you didn’t understand that. If you did understand that, go right ahead and code it. If not, just know that it’d either be too slow in Codea or you need to write Objective-C or Swift code to make it work.

@Zoyt it should be possible, I think setContext() might be a bit of a bottleneck now that it handles a depth buffer as well (unnecessary a lot of the time).

But UIVisualEffectView and UIVibrancyEffect are just implemented as GLSL shaders anyway. The iOS 7 blur is performed a very downscaled image — two passes are used to do a gaussian blur (horizontal and vertical 1D blurs). The blurred image is then tinted and upscaled depending on the blur effect.

The tint is the slowest part of the process I think, as is the UIVibrancyEffect masking effect.

@SkyTheCoder you’d be much better off using two 1D blurs instead the Blur that comes in the Shader Lab. It’s much faster because you sample far fewer pixels, and you would end up with a much nicer looking blur.

Ah. Alright. I’ve just been unable to write a good blur shader, so I assumed the one in the shader lab was best.
The other thing I didn’t mention that most people don’t realize is the UIVibrancyEffect views also use blend modes to look better than just having a transparent background. If you’re curious about them, go to 19:50 in the “Adapting Your App to the New UI of Yosemite” here.