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

查看:161
本文介绍了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 August 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天全站免登陆