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?
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.
-
-
\$\begingroup\$ 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. \$\endgroup\$ – Nathan Reed Oct 10 '11 at 21:17
Use Compute shaders (DirectX 11) or OpenCL on desktop systems.