Right now we have two different ways to round specific corners. One is used in rects where we have a different shader for each corner, and the other is in the tex shader where we do some step magic. We should settle on one impl for all corners.
One alternative idea I have is to completely remove the round_rect shader and the corner rounding logic in the tex shader, and damage everything EXCEPT the corners. Then we could damage the corners and have a shader for each corner. We'd need to do some benchmarking here, because this could either improve or decrease perf depending on how expensive damaging is vs saving the extra GPU instructions in the tex and rect shaders would be
Right now we have two different ways to round specific corners. One is used in rects where we have a different shader for each corner, and the other is in the tex shader where we do some
step
magic. We should settle on one impl for all corners.One alternative idea I have is to completely remove the round_rect shader and the corner rounding logic in the tex shader, and damage everything EXCEPT the corners. Then we could damage the corners and have a shader for each corner. We'd need to do some benchmarking here, because this could either improve or decrease perf depending on how expensive damaging is vs saving the extra GPU instructions in the tex and rect shaders would be