|
|
|
|
|
by jerf
4618 days ago
|
|
In addition to what was already there, I'd suggest looking at trying to operate on the whole image at a time rather than pixel-by-pixel. To take a simple blur example, a blur that samples the local pixel at 50%, and each of the top, bottom, left, and right by 12.5% is equivalent to drawing the entire image half darkened, then drawing it in each of one pixel to the left, right, up, and down at 12.5% of the original brightness, merging additively. I don't know if this would be faster or not, you'd have to profile it, but I'd consider it worth a try. |
|
Additionally, the advantage of computing pixel by pixel is that the shader can operate massively parallel.