是否可以在没有 CUDA/OpenCL 等的情况下使用 GPU 进行光线跟踪?
我正在使用 Windows Phone 7,它不支持 CUDA 或 OpenCL 等功能。我是 GPU 方面的新手,GPU 上有什么东西可以用来帮助加速光线追踪吗?像三角形相交测试吗?或者从纹理中选择正确的颜色?
I'm working on Windows Phone 7 which does not support features like CUDA or OpenCL. I'm new to the GPU side of things, Is there anything on the GPU that I can use to help speed up raytracing? Like triangle intersection tests? Or selecting the correct colour from a texture?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
CUDA 等实际上只是用于编程着色器的高级语言,因此任何支持可编程着色器的平台都允许您具有在 GPU 上运行通用计算的能力。
不幸的是,它看起来像 Windows Phone 7 不支持自定义可编程着色器,因此光线追踪器的 GPU 加速目前还不太可能。即使是这样,有效地使用 GPU 进行光线追踪也非常困难,因为有几个非常反 GPU 的特性:
如果您的目标是编写光线跟踪器,那么可能会更容易完全在CPU上,然后才考虑更深奥的优化。
CUDA and the like are really just higher level languages for programming shaders, so any platform that supports programmable shaders allows you some capability to run general purpose calculations on the gpu.
Unfortunately, it looks like Windows Phone 7 does not support custom programmable shaders, so GPU acceleration for a ray tracer is not really possible at this time. Even if it was, it is very difficult to effecticely use a GPU for raytracing because of several very anti-GPU characteristics:
If your goal is to write a raytracer, it would probably be far easier to do completely on the CPU, and only then consider optimizations that are more esoteric.
即使在现代普通台式电脑上,光线追踪仍然有点慢。您可以通过仅拍摄主光线来加快速度,但光栅化方法实际上会更好更快。
您确定要在计算能力比 PC 还要差的手机上进行光线追踪吗?他们不是为了做那种工作而设计的。
Raytracing is still a bit slow, even on modern average desktop PC. You can speed it up by shooting just primary rays, but then rasterisation methods will be actually better and faster.
Are you certain, you want to do ray-tracing on a phone, which has even less compute power than PC? They are not designed to do that kind of work.