Closed DearFox closed 4 months ago
LGTM! There's also other brush-like tools, I'll edit this after merge.
Do you think it's worth changing this to make width go from minsize
at minimum pressure to size
at maximum, linearly via lerp(min, max, pressure)
, instead of all pressure levels below minimum giving the minimum width? This could also "fix" the unconstrained minsize issue.
LGTM! There's also other brush-like tools, I'll edit this after merge.
Do you think it's worth changing this to make width go from
minsize
at minimum pressure tosize
at maximum, linearly vialerp(min, max, pressure)
, instead of all pressure levels below minimum giving the minimum width? This could also "fix" the unconstrained minsize issue.
Sounds like a good idea. To be honest my implementation is a bit rough
I was offered a replacement
var radius = max((brushsize * 0.5) * (pressure if pen_flags[0] else 1.0),(brushminsize * 0.5))
on
var radius = remap(((brushsize * 0.5) * (pressure if pen_flags[0] else 1.0)), 0.0, (brushsize * 0.5), (brushminsize * 0.5), (brushsize * 0.5))
In the paint function
This should solve the unused push in my previous implementation.
Look overengineered, but good. Thank you!
Interesting behaviour:
Fixes strange brush behavior when drawing from a graphics tablet when the pressure on the stylus is low enough that the actual brush size is less than 1 pixel
We're talking about this strange brush behavior:![4f03ca066d5710a2](https://github.com/don-tnowe/godot-sprite-painter/assets/59219907/12db9ab8-d737-48ed-bc49-497259690640)
Adds a new setting for the brush and eraser tools:![изображение](https://github.com/don-tnowe/godot-sprite-painter/assets/59219907/5be8decb-4be8-4e84-b471-91b3c965e4ab)
Known "bugs": "Min Size" - not limited by the maximum threshold equal to "Size" It follows from this that if “Min Size” is greater than “Size”, then “Min Size” will have priority.