Add fade to slope range tool settings when out of range#767
Add fade to slope range tool settings when out of range#767Xtarsia wants to merge 1 commit intoTokisanGames:mainfrom
Conversation
TokisanGames
left a comment
There was a problem hiding this comment.
This bleeds a bit excessively.
Here I painted with a 0-38 slope, which is the same as the autoshader. The far right is 0-28. Yet it never filters out the vertical faces.

I was expecting it would bleed a little bit into the area like it had a fixed width margin, but not go beyond that. This seems like it just changes the sloped area to a low power brush. If I'm filtering by slope, a little bleed on the edges is fine, but it should not be painting outside of the set area.
The instancer and texture painting seem to work as before (binary on or off).
| const Vector2 slope_range = CLAMP(p_slope_range, V2_ZERO, Vector2(90.f, 90.f)); | ||
| if (slope_range.y - slope_range.x > 89.99f) { | ||
| return true; | ||
| return real_t(1.f); |
There was a problem hiding this comment.
Casting float literals isn't necessary. Nor for the float math in the returns below. They'll be converted automatically for free. It's only necessary for some templates like Lerp or MIN/MAX because the linter is particular about the exact type.
Closes #725
example with the color map, painting red with a high slope limit, gives soft edges outside the range when painting.
any time the original was "true" will still be 1.0 here, only the false conditions get faded out here.