From 829176a25e88d5884291768888ea3c674ba092c1 Mon Sep 17 00:00:00 2001 From: jracek Date: Tue, 14 Jan 2025 20:15:53 +0100 Subject: [PATCH] Max K-means customization in PSXObjectExporter component --- Runtime/PSXTexture.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Runtime/PSXTexture.cs b/Runtime/PSXTexture.cs index ca60bf0..e126cf9 100644 --- a/Runtime/PSXTexture.cs +++ b/Runtime/PSXTexture.cs @@ -27,6 +27,8 @@ namespace PSXSplash.RuntimeCode [Range(1, 256)] public int Height = 128; + public int MaxKMeans = 50; + public ushort[] ExportTexture(GameObject gameObject) @@ -49,7 +51,7 @@ namespace PSXSplash.RuntimeCode } else { - var (indexedPixels, _) = ImageQuantizer.Quantize(newTexture, (int)TextureType, 100); + var (indexedPixels, _) = ImageQuantizer.Quantize(newTexture, (int)TextureType, MaxKMeans); return indexedPixels; } @@ -77,7 +79,7 @@ namespace PSXSplash.RuntimeCode } else { - var (_, generatedClut) = ImageQuantizer.Quantize(newTexture, (int)TextureType, 100); + var (_, generatedClut) = ImageQuantizer.Quantize(newTexture, (int)TextureType, MaxKMeans); return generatedClut; }