Fix #35140: texture paint would give 'noisy' strokes and poor results for strokes
crossing themselves.

Again an old issue, the code that was limiting the max contribution to a pixel by
doing a max() operation, which is very sensitive to the spacing of the stroke dabs.
Instead we now use a formula does adds up on repeated dabs but approaches the
maximum brush value slowly and never exceeds it, which gives nice smooth results.

mask_accum = mask_accum + (sqrt(brush_max) - mask_accum) * sqrt(brush_max) * mask;

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56391 954f8c5b-7b00-dc11-b283-0030488c597c