Hi Markus.

In the mean time I have implemented several algorithms with CUDA and have now 
more experience with it. CUDA has one big advantage over a GLSL calculations, 
that it does support random access on the memory. Hence you can read from and 
write to everywhere in the video memory, just as you do it with C/C++. 

This is a big difference to GLSL where you can read from everywhere, however 
you could write only to certain places. With GLSL results are written into a 
texture on specific position depending on fragment's rasterisation coordinates. 
This makes CUDA just more powerfull than GLSL and hence my sentence: "just 
another way of shader impl." becames less meaningfull :)

However using CUDA with osgPPU/osg or even just with OpenGL is currently not 
well supported by nVidia. The problem is that data is not easy transferable 
from OpenGL to CUDA and backwards. Even if the data is in the video memory, it 
has to be moved into CUDA memory space. Which slowdowns your performance. I 
hope that this issue will be solved in the near future, so that using CUDA 
instead of GLSL becames a standard way of writing shaders. GLSL shaders could 
than be just a subset of CUDA kernel's  :D 

Hence if you really need input from your rendering pipeline or you want to use 
the output of your calculations to render something, I would currently suggest 
to use simple GLSL for that. However if your calculations are independent of 
rendering pipeline, I would suggest to use CUDA, because it provides you with 
much flexible "pipeline" and more cool ways of optimizing your code for the 
hardware. Of course you then do not need any osg/osgPPU thing anymore ;)


Best regards,
art

------------------
Read this topic online here:
http://osgforum.tevs.eu/viewtopic.php?p=4864#4864





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to