iOS GLSL.有没有办法使用 GLSL 着色器创建图像直方图? [英] iOS GLSL. Is There A Way To Create An Image Histogram Using a GLSL Shader?

查看:23
本文介绍了iOS GLSL.有没有办法使用 GLSL 着色器创建图像直方图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 StackOverflow 的其他地方,有人问了一个关于深度缓冲区直方图的问题 - 创建深度缓冲区带有 GLSL 的直方图纹理.

Elsewhere on StackOverflow a question was asked regarding a depthbuffer histogram - Create depth buffer histogram texture with GLSL.

我正在编写一个 iOS 图像处理应用程序,对这个问题很感兴趣,但不清楚所提供的答案.那么,是否可以通过 GLSL 使用 GPU 创建图像直方图?

I am writing an iOS image-processing app and am intrigued by this question but unclear on the answer provided. So, is it possible to create an image histogram using the GPU via GLSL?

推荐答案

是的.这显然不是最好的方法,但它确实是 iOS 中最好的方法,因为不支持 OpenCL.您将失去优雅,并且您的代码可能不会那么简单,但几乎所有 OpenCL 功能都可以通过着色器实现.

Yes, it is. It's not clearly the best approach, but it's indeed the best one available in iOS, since OpenCL is not supported. You'll lose elegance, and your code will probably not as straightforward, but almost all OpenCL features can be achieved with shaders.

如果有帮助,DirectX11 附带了一个用于计算着色器的 FFT 示例.请参阅 DX11 八月 SDK 发行说明.

If it helps, DirectX11 comes with a FFT example for compute shaders. See DX11 August SDK Release Notes.

这篇关于iOS GLSL.有没有办法使用 GLSL 着色器创建图像直方图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆