We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d034a70 commit 75813f3Copy full SHA for 75813f3
core/pixel-conversion.hpp
@@ -6,7 +6,7 @@
6
namespace msdfgen {
7
8
inline byte pixelFloatToByte(float x) {
9
- return byte(clamp(256.f*x, 255.f));
+ return byte(~int(255.5f-255.f*clamp(x)));
10
}
11
12
inline float pixelByteToFloat(byte x) {
0 commit comments