ZIM il y a 1 an
Parent
commit
4bab89abc7

+ 1 - 0
Assets/InfraredProject/WebCamera/Script/ZIM/ZIMUnity/Extension.cs

@@ -71,6 +71,7 @@ namespace ZIM.Unity
         // 转换为整数再计算
         // 转换为整数再计算
         public static int Brightness(this Color c, int colorBits)
         public static int Brightness(this Color c, int colorBits)
         {
         {
+            colorBits -= 1;
             int r = (int)(c.r * colorBits);
             int r = (int)(c.r * colorBits);
             int g = (int)(c.g * colorBits);
             int g = (int)(c.g * colorBits);
             int b = (int)(c.b * colorBits);
             int b = (int)(c.b * colorBits);