4 ms·
tangential question: does anyone know a way to call/use CUDA from graphics code? like directx or opengl (or whatever). as opposed to this code which is named "r
by almostgotcaught 1y ago
tangential question: does anyone know a way to call/use CUDA from graphics code? like directx or opengl (or whatever). as opposed to this code which is named "renderer" but doesn't draw to the screen...
- Ono-Sendai 1y agocompute shaders?
- animal531 1y agoYeah, for example Unity uses C#, so you can used a managed CUDA library. If you're using a C engine like Unreal etc. its even easier since you can just include the code. But having said that, a giant drawback to using CUDA in gaming is that the overhead of transforming and copying your data to/from CUDA kills off a lot of the performance, so while its still great its not nearly as good as writing compute shaders. They are a topic of their own, the code can start off quite basic but with recent additions you can now also do some really advanced thread management and coordination. They still come with big overhead to moving data around, but in general they're better suited to the use-case than CUDA.
- corysama 1y agoThere are DX/GL interop functions in the CUDA API. But, they are a bit tricky. Unless you really have a strong, specific need for something only available in CUDA, you are better off using compute shaders.
- pixelpoet 1y agoJust because a program isn't using DirectX or OpenGL etc doesn't mean it's not a renderer / graphics code.