3 ms·
if you want to, there are at least a couple flavors of parallel bresenham - is not particularly tricky on the face of it. you do have to be super careful with y
by convolvatron 8y ago
if you want to, there are at least a couple flavors of parallel bresenham - is not particularly tricky on the face of it. you do have to be super careful with your arithmetic so that tasks end up mapping to unique pixels. and yeah, you have to be in an environment where task creation overhead is effectively 0 for it to make sense.
- pcwalton 8y agoYeah, to be more specific the problem with doing Bresenham on GPU is that, in the traditional GPU pipeline, the main way to create tasks is to use the fixed-function triangle rasterization hardware. I guess one could technically do something like figuring out the number of pixels spanned on CPU and then rasterizing point primitives. In your vertex shader you'd have each 1x1 pixel point figure out, in parallel, where it's supposed to go. This is of course bound to be horrendously slow and would never be practical :)