When it comes to line drawing, DDA is the simplest and most intuitive algorithm, the core idea being:
- compute the slope of the line
- for every increment in x, increment y by the slope
However, DDA is not favored due to its use of floating point operations. In fact, avoiding floating point operations is a common theme in graphics. I am wondering about the relative cost of floating point operations versus integer operations in modern GPU's
I could do some benchmarking but my CUDA is rusty. There is a question on SO and the common wisdom there seems to be, "it depends".
My question is specific to computer graphics and line drawing. If a more general answer can be given, that will also be appreciated.
To state my question specifically, is it important with modern GPU architectures to avoid floating point operations in favor of integer operations?