简体   繁体   中英

How to create ios blur effect with gles

我的应用程序跨android / ios,它基于GLES,我想在某些消息框后创建一个模糊的叠加视图,以某种方式用gles实现ios样式模糊?

Runtime blurring requires sampling input with a kernel, and averaging the samples. This is expensive, and grows more and more expensive with the size of the blur kernel. Gaussian filter with OpenGL Shaders explains how to implement this in OpenGL ES.

However, for efficiency, blurred shadows for things such as message boxes are done offline, because their shape does not change dynamically (even though their scale may). So, you would create an image (offline) that contains the blurred message box, and render a primitive underneath your message box geometry, with blurred image mapped on it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM