POV-Ray : Newsgroups : povray.unofficial.patches : Thoughts about using CUDA for rendering? : Re: Thoughts about using CUDA for rendering? Server Time
16 Apr 2024 13:02:01 EDT (-0400)
  Re: Thoughts about using CUDA for rendering?  
From: David Wallace
Date: 3 Aug 2009 06:19:00
Message: <4a76b994$1@news.povray.org>
clipka wrote:
> "Random_Kevin" <nomail@nomail> wrote:
>> I was wondering, while waiting for a render of course, how hard it would be to
>> get povray to use the 128 processors in my Nvidia card? My quad-core AMD
>> processor does a good job but there's always something bigger and more complex
>> to render.
> 
> The answer to this type of question - which can be generalized as "can (or: why
> can't, or: how hard would it be to make) POV-Ray use my graphics card?" -
> hasn't changed since it was last asked a few months ago (no need to feel bad
> about asking it though: it was about time again ;)):
> 
> GPUs are still (and can be expected to continue to be) unsuited to the general
> task of ray tracing, and modifying POV-Ray to be able to dispatch part of its
> computations to them would be cumbersome and probably ineffective.
> 
> The following quote from Wikipedia about the limitations of CUDA in particular
> (but which also applies to GPUs in general) gives an insight why this is so:
> 
> "Threads should be running in groups of at least 32 for best performance, with
> total number of threads numbering in the thousands. Branches in the program
> code do not impact performance significantly, provided that each of 32 threads
> takes the same execution path; the SIMD execution model becomes a significant
> limitation for any inherently divergent task (e.g., traversing a ray tracing
> acceleration data structure)."
> 
> GPUs are specialized on crunching a lot of numbers, all in exactly the very same
> way. Raytracing does not provide many tasks that fit this bill; for each ray
> there's a lot of decisions to make: Does this ray intersect object X? Is the
> intersection point inside or outside of all the other objects in the same CSG
> group? Has radiosity data been gathered in the vicinity? Is the object
> reflective? Is it transparent? Does refraction occur? Does total reflection
> occur? Does dispersion occur? And so forth.
> 
> There *may* be ways to implement raytracing in a manner that is suitable for GPU
> operation, or at least "outsorcing" some tasks; but the POV-Ray code is
> definitely not.
> 
> 
> 
You are talking about the vertex shader part of a graphics card and its 
limited applicability to surfaces generated mathematically via POV-Ray. 
  I am more interested in the pixel shader and offloading the texture 
evaluation, especially the built-in patterns, to the graphics card. 
That should be much easier.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.