|
|
|
|
|
by muks
5358 days ago
|
|
What's discussed in the article depends on the capabilities of hardware you are targeting. :) Filling is typically a bottleneck as you are writing to a lot of memory. Square roots can also be rather slow, esp. when there's no hardware implementation of it. Square roots, divisions, multiplications, additions and subtractions, and shifts perform in order of slowest to fastest. Some processors have no floating point hardware. Some processors do shifts,
additions and subtractions much faster than multiplications and divisions. Think of the article as a bunch of ways to draw circles, and you can make up something based on what device you write your code for. :) Drawing the circle as points using the last function in the article, rather than 2 concentric fills would be faster unless you have some unique hardware for it. :) Disk filling can be implemented in a fragment shader by testing each point against the implicit equation. Such testing is easily parallelized. You are a clever thinker nevertheless. :) |
|