Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
What about PhysX? –  Dan the Man 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

Use Compute shaders (DirectX 11) or OpenCL on desktop systems.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.