Пример #1
0
 // Token: 0x06000AA1 RID: 2721 RVA: 0x0002DBA0 File Offset: 0x0002BFA0
 public static void BilinearScale(object obj)
 {
     TextureUtility.ThreadData threadData = (TextureUtility.ThreadData)obj;
     for (int i = threadData.start; i < threadData.end; i++)
     {
         int num  = (int)Mathf.Floor((float)i * TextureUtility.ratioY);
         int num2 = num * TextureUtility.w;
         int num3 = (num + 1) * TextureUtility.w;
         int num4 = i * TextureUtility.w2;
         for (int j = 0; j < TextureUtility.w2; j++)
         {
             int   num5  = (int)Mathf.Floor((float)j * TextureUtility.ratioX);
             float value = (float)j * TextureUtility.ratioX - (float)num5;
             TextureUtility.newColors[num4 + j] = TextureUtility.ColorLerpUnclamped(TextureUtility.ColorLerpUnclamped(TextureUtility.texColors[num2 + num5], TextureUtility.texColors[num2 + num5 + 1], value), TextureUtility.ColorLerpUnclamped(TextureUtility.texColors[num3 + num5], TextureUtility.texColors[num3 + num5 + 1], value), (float)i * TextureUtility.ratioY - (float)num);
         }
     }
     TextureUtility.mutex.WaitOne();
     TextureUtility.finishCount++;
     TextureUtility.mutex.ReleaseMutex();
 }