mirror of
https://github.com/Chlumsky/msdfgen.git
synced 2026-01-18 17:11:23 +01:00
GPU-like pixel conversion
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
namespace msdfgen {
|
||||
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user