ZIM 1 год назад
Родитель
Сommit
4bab89abc7
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      Assets/InfraredProject/WebCamera/Script/ZIM/ZIMUnity/Extension.cs

+ 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)
         {
+            colorBits -= 1;
             int r = (int)(c.r * colorBits);
             int g = (int)(c.g * colorBits);
             int b = (int)(c.b * colorBits);