We have a bad aliasing problem when painting with a small autobrush. It is a regression since 2.3. See http://forum.kde.org/viewtopic.php?f=138&t=96043&hilit=ramon&start=15 for more discussion. This is a really big problem for Krita -- we need to find a solution. Also from IRC: 18:05:36 < basse> http://dl.dropbox.com/u/2965641/a.png 18:05:57 < basse> lot of aliasing ... 08:30:37 < basse> boud: yes, i compiled git version, so this is recent krita 08:32:30 < basse> so i'm not trying to see what is different, why autobrush produces this 09:02:28 < boud> basse: we had a discussion about it on the forum; we 09:02:34 < boud> re not sure what happens either... 09:03:52 < basse> http://dl.dropbox.com/u/2965641/aa.png 09:04:14 < basse> ok, have to check the forums, but its not happening so much with big brushes.. but small ones you can't really use :( 09:04:32 < boud> the weird thing is, with the predefined brushes it seems to work ok 09:04:48 < basse> and i dont remember this behaviour in the krita i had from repos 09:05:07 * basse checks predefineds 09:06:54 < basse> oh, you are right. it's better there. 09:07:07 < basse> i had 1x1 pixel brush in gimp too because i never trusted those autobrushes 09:07:50 < boud> there might even be a difference if you select the soft brush option in the autobrush 09:08:43 < basse> there was a bit i noticed that, but not much 09:09:00 < basse> funny, if i scale my 1x1 pixel brush it comes out as triangle :) 09:09:15 < basse> it's meant to be 1 pixel size anyways
Created attachment 63656 [details] potential fix This patch (not pushed) supersamples the autobrush to smooth it. Currently the SUPERSAMPLING parameter is set to 3, i.e. it averages 9 points in a 3x3 grid. It significantly reduces this problem, as far as I can tell. However, I'm concerned about (a) the hack-like nature of the patch, and (b) possible performance issues with calling valueAt a large number of times. Suggestions?
valueAt is really expensive operation, so it should be avoid if possible. It shouldn't be used with big brushes as that would be a major performance hit.
Maybe we can just enable it for small brushes? The aliasing problem doesn't happen with big brushes anyway.
Created attachment 64130 [details] disable supersampling for big brushes This does what boud suggested, although I'm not quite sure if this is the right heuristic to use. Patch applies on top of the previous one.
I also wasn't on the CC for this bug. Whoops.
For the moment my workaround with small brush is to apply this sort of curves , then the aliasing is ok ( maybe a bit too smooth, I have to find the right setting ) http://img11.imageshack.us/img11/8024/aliasingautobrush.jpg
Looks good to me! What do you think, Sven?
I don't notice a visible slowdown -- it might be possible to optimize some more, but I want to push these patches now.
But the bug shouldn't be closed yet.
*** Bug 247363 has been marked as a duplicate of this bug. ***
The unittest is fixed -- I think we can close this bug now, right?
I don't think 247363 is a dupe of this bug, though. That bug is about the fading of large brushes, which is unaffected by the patch for this bug.
Ok, reopened that one, closed this one then. Goffrie, do you have any ideas about 247363?