This commit is contained in:
Ryan Oldenburg 2021-06-25 22:24:45 -05:00
parent 14cfd34750
commit b1bc2d048c
2 changed files with 6 additions and 6 deletions

View file

@ -537,10 +537,10 @@ proc getRgbaSmooth*(image: Image, x, y: float32, wrapped = false): ColorRGBX =
x1y1 = image[x1, y1]
let
bottomMix = lerp(x0y0, x1y0, xFractional)
topMix = lerp(x0y1, x1y1, xFractional)
topMix = lerp(x0y0, x1y0, xFractional)
bottomMix = lerp(x0y1, x1y1, xFractional)
lerp(bottomMix, topMix, yFractional)
lerp(topMix, bottomMix, yFractional)
proc drawCorrect(
a, b: Image | Mask, mat = mat3(), tiled = false, blendMode = bmNormal

View file

@ -171,10 +171,10 @@ proc getValueSmooth*(mask: Mask, x, y: float32): uint8 =
x0y1 = mask[x0, y1]
x1y1 = mask[x1, y1]
bottomMix = lerp(x0y0, x1y0, xFractional)
topMix = lerp(x0y1, x1y1, xFractional)
topMix = lerp(x0y0, x1y0, xFractional)
bottomMix = lerp(x0y1, x1y1, xFractional)
lerp(bottomMix, topMix, yFractional)
lerp(topMix, bottomMix, yFractional)
proc spread*(mask: Mask, spread: float32) =
## Grows the mask by spread.