mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-31 21:37:08 -06:00
Imported brushes whose Texture uses Height or Linear Height at a low depth (common in Photoshop brush packs) painted nothing: the modes were modelled backwards (paint only on the brightest texels, more of it with more depth). Measured against Photoshop with single dabs over a 0..255 ramp pattern: - Height: paint reaches 12 x depth x coverage into the pattern and fills what lies below it (dark valleys first; a brighter pattern takes paint away, which is why the reporter had to flip Brightness's sign). Linear Height grades the shallow end by the pattern instead. - Subtract takes depth x pattern away (white removes the most paint); Color Dodge/Burn scale the pattern toward their neutral with depth. These now live in texture_combine; the Dual Brush keeps mask_combine. - Brightness shifts the pattern by value/255 (not value/150); positive Contrast steepens by 1/(1-c/100) after the shift, negative flattens by 1+c/100 before it. Texture::level is shared by the renderer and the Brush Settings swatch. - ABR import mapped textureContrast with /50 for both signs; positive values are now /100, matching the model and the Brush Settings field. Built-in Subtract presets get Invert so they look as before. Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>