mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 17:40:01 +00:00
Fix soft light layer blending mode
This commit is contained in:
parent
76df84491e
commit
c23967b547
@ -1,5 +1,5 @@
|
||||
// Aseprite Document Library
|
||||
// Copyright (c) 2001-2016 David Capello
|
||||
// Copyright (c) 2001-2017 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -73,9 +73,9 @@ inline uint32_t blend_soft_light(uint32_t _b, uint32_t _s)
|
||||
d = std::sqrt(b);
|
||||
|
||||
if (s <= 0.5)
|
||||
r = b - (1.0 - 2.0*s) * b * (1.0 - b);
|
||||
r = b - (1.0 - 2.0 * s) * b * (1.0 - b);
|
||||
else
|
||||
r = b - (1.0 - 2.0*s) * b * (1.0 - b);
|
||||
r = b + (2.0 * s - 1.0) * (d - b);
|
||||
|
||||
return (uint32_t)(r * 255 + 0.5);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user