|
@@ -6,7 +6,7 @@
|
|
|
namespace msdfgen {
|
|
namespace msdfgen {
|
|
|
|
|
|
|
|
inline byte pixelFloatToByte(float x) {
|
|
inline byte pixelFloatToByte(float x) {
|
|
|
- return byte(clamp(256.f*x, 255.f));
|
|
|
|
|
|
|
+ return byte(~int(255.5f-255.f*clamp(x)));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
inline float pixelByteToFloat(byte x) {
|
|
inline float pixelByteToFloat(byte x) {
|