|
![](/i/fill.gif) |
>> But if you think about common scenes where you have walls and floors
>> and so forth, it might be worth using the GPU to test ray
>> intersections against these, and against bounding volumes (if you're
>> using them). Huge numers of rays need to be run through these tests,
>> so the GPU can fire those off quite quickly.
>
> But those tests are also quite simple, so would benefit the least from
> the GPU.
How do you figure that?
The benefit of the GPU isn't the complexity of the kernels it executes
(usually quite the converse), it's more the fact that it can do the same
operations many, many times over simultaneously.
> If isosurfaces could be translated efficiently into shaders,
> then those would show the most benefit (and Julia fractals, of course).
No arguments here.
>> It might also be worth running the "so what the hell is the colour of
>> this surface?" calculation on the GPU - what with texturing, normal
>> maps, multiple light rays of different angles and colours, etc.
>
> Possibly. In fact, using the GPU for GI might be an option.
Yes, there's a couple of ways you might implement this, with varying
degrees of accuracy. For example, you could feed the GPU a polygon mesh
approximating the scene. (There are already known algorithms for doing
GI on a polygon mesh.) Or you could just use the GPU to accelerate the
insane number of ray intersection tests required during GI.
>> Also, let's clear this up: My understanding is that the GPU does not
>> require *all* cores to run an identical kernel. IIRC, the cores are
>> grouped into (fairly large) bundles, each bundle runs a single kernel,
>> but different bundles can run completely different kernels. So you
>> don't need a ray queue with enough rays for the entire GPU, just for a
>> whole bundle of cores.
>
> True, I think the shaders are in blocks of 4, and you have to have
> groups of 32 blocks running the same shader or something like that
> (which would be 128 shaders per program). I don't remember the exact
> numbers, though, and in fact it's probably GPU dependent.
Yeah, I'm pretty sure the batch sizes vary by GPU model. But the main
point is, you don't have to assign *all* cores to the same kernel; just
sufficiently large bunches of them.
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|
![](/i/fill.gif) |