Comment on Exact UNORM8 to float by amutel

Super interesting! I recently had this problem of precision when converting colors. I came with a slightly different solution to this problem, giving similar exact results and slightly 10% faster. Code in C#:

static float ByteToFloat(byte value) => (value + value + value) (1.0f / (3.0f 255.0f));

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论