From 514e5ce3287c0b2052377b090d2ede8090ad0c60 Mon Sep 17 00:00:00 2001 From: Lilaa3 <87947656+Lilaa3@users.noreply.github.com> Date: Mon, 22 Jan 2024 18:40:49 +0000 Subject: [PATCH] Devwizard's suggestion --- fast64_internal/f3d/f3d_material.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fast64_internal/f3d/f3d_material.py b/fast64_internal/f3d/f3d_material.py index b66ab5ab4..29e70cdc9 100644 --- a/fast64_internal/f3d/f3d_material.py +++ b/fast64_internal/f3d/f3d_material.py @@ -3394,9 +3394,9 @@ def getOptimalFormat(tex, curFormat, isMultitexture): hasAlpha1bit = True pixelValues.add(getRGBA16Tuple(color)) - tex_size = tex.size[0] * tex.size[1] + n_size = tex.size[0] * tex.size[1] if isGreyscale: - if tex_size > 4096: + if n_size > 4096: if not hasAlpha1bit: texFormat = "I4" else: @@ -3408,9 +3408,9 @@ def getOptimalFormat(tex, curFormat, isMultitexture): texFormat = "IA8" else: prefer_ci_over_rgba = bpy.context.scene.fast64.settings.prefer_ci_over_rgba - if (prefer_ci_over_rgba and len(pixelValues) <= 16) or (len(pixelValues) <= 16 and tex_size > 2048): + if (prefer_ci_over_rgba and len(pixelValues) <= 16) or (len(pixelValues) <= 16 and n_size > 2048): texFormat = "CI4" - elif prefer_ci_over_rgba and len(pixelValues) <= 256 and tex_size <= 2048: + elif prefer_ci_over_rgba and len(pixelValues) <= 256 and n_size <= 2048: texFormat = "CI8" else: texFormat = "RGBA16"