From: Rudolf Polzer Date: Thu, 18 Mar 2021 14:43:11 +0000 (-0700) Subject: Turn off renormalizing. X-Git-Tag: xonotic-v0.8.5~70 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=f760626df5a119117f0dc02cc683ab97b804a8ee;p=xonotic%2Fxonotic.git Turn off renormalizing. Crunch's renormalizing code looks hellish, and DP already renormalizes normalmaps in the GLSL shader anyway. Yes, means the mipmaps may not end up great. Should be OK though. --- diff --git a/misc/tools/cached-converter.sh b/misc/tools/cached-converter.sh index ec976351..cb905953 100755 --- a/misc/tools/cached-converter.sh +++ b/misc/tools/cached-converter.sh @@ -404,7 +404,10 @@ for F in "$@"; do export S2TC_REFINE_COLORS=LOOP export S2TC_DITHER_MODE=NONE # Engine ignores alpha channel on these, so we can use the DXT1 black encoding. - export CRUNCH_TEXTYPEFLAGS='-gamma 1.0 -renormalize -rtopmip -uniformMetrics -usetransparentindicesforblack' + # Not that that color should happen very often on a deluxemap, but who knows. + # NOT renormalizing, as DP does its own renormalization anyway in the GLSL shader + # and crunch's renormalizing looks like it can cause banding artifacts. + export CRUNCH_TEXTYPEFLAGS='-gamma 1.0 -uniformMetrics -usetransparentindicesforblack' ;; *_norm) export S2TC_COLORDIST_MODE=NORMALMAP @@ -412,7 +415,9 @@ for F in "$@"; do export S2TC_REFINE_COLORS=LOOP export S2TC_DITHER_MODE=NONE # Alpha channel here means height. - export CRUNCH_TEXTYPEFLAGS='-gamma 1.0 -renormalize -rtopmip -uniformMetrics' + # NOT renormalizing, as DP does its own renormalization anyway in the GLSL shader + # and crunch's renormalizing looks like it can cause banding artifacts. + export CRUNCH_TEXTYPEFLAGS='-gamma 1.0 -uniformMetrics' ;; *) export S2TC_COLORDIST_MODE=SRGB_MIXED