Switched to ThumbHasher over BlurHasher

This commit is contained in:
2023-05-21 23:56:10 -07:00
parent 514637b9c6
commit a0c880c7ba
26 changed files with 803 additions and 121 deletions

View File

@ -63,9 +63,9 @@ public static class BlurHasher
for (int x = 0; x < width; x++)
{
ref Pixel res = ref result[x, y];
res._Blue = MathUtils.SRgbToLinear(rgb[index++]);
res._Green = MathUtils.SRgbToLinear(rgb[index++]);
res._Red = MathUtils.SRgbToLinear(rgb[index++]);
res.Blue = MathUtils.SRgbToLinear(rgb[index++]);
res.Green = MathUtils.SRgbToLinear(rgb[index++]);
res.Red = MathUtils.SRgbToLinear(rgb[index++]);
}
}
@ -92,9 +92,9 @@ public static class BlurHasher
{
Pixel pixel = pixelData[xPixel, yPixel];
data[index++] = (byte)MathUtils.LinearTosRgb(pixel._Blue);
data[index++] = (byte)MathUtils.LinearTosRgb(pixel._Green);
data[index++] = (byte)MathUtils.LinearTosRgb(pixel._Red);
data[index++] = (byte)MathUtils.LinearTosRgb(pixel.Blue);
data[index++] = (byte)MathUtils.LinearTosRgb(pixel.Green);
data[index++] = (byte)MathUtils.LinearTosRgb(pixel.Red);
data[index++] = 0;
}