Summary: | Bad aliasing problem when using autobrush at small sizes | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Halla Rempt <halla> |
Component: | Brush engines | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | enkithan, goffrie, info |
Priority: | NOR | ||
Version: | git master (please specify the git hash!) | ||
Target Milestone: | --- | ||
Platform: | Unlisted Binaries | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
potential fix
disable supersampling for big brushes |
Description
Halla Rempt
2011-09-05 07:53:14 UTC
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? |