In my previous question, I asked about why people don't program on the GPU. Now I am learning about fluid dynamics with this article. They say that it should all be done on the GPU. The game engine that I use is Unity, and I know that shaders are run on the GPU. But is there any way to program (other than shaders) on the GPU?
Asked
Active
Viewed 6,694 times
2 Answers
2
Vertex and pixel shaders are the primary way that graphics programming on the GPU is done. However, more recent GPUs also support some technologies for more general-purpose parallel programming, such as CUDA (NVIDIA only), OpenCL, and most recently compute shaders (on DirectX 11 GPUs; google for more info about them). I don't think CUDA or OpenCL can effectively interchange data with the graphics pipeline, but compute shaders can.

Nathan Reed
- 33,657
- 3
- 90
- 114
-
What about PhysX? – Daniel Oct 10 '11 at 20:47
-
PhysX can use the GPU, yes. But that's not really programming on the GPU, since the GPU stuff is already done for you by the PhysX developers. – Nathan Reed Oct 10 '11 at 21:17