OSDN Git Service

DXT1 needs a workaround here
authorRudolf Polzer <divverent@xonotic.org>
Sat, 16 Jul 2011 12:07:03 +0000 (14:07 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sat, 16 Jul 2011 12:07:03 +0000 (14:07 +0200)
s2tc_compressor.cpp

index e390197..0da0dfb 100644 (file)
@@ -730,7 +730,7 @@ namespace
                                                        c[4].r = rgba[(x + y * iw) * 4 + 2];
                                                        c[4].g = rgba[(x + y * iw) * 4 + 1];
                                                        c[4].b = rgba[(x + y * iw) * 4 + 0];
-                                                       if(alpha_0_is_unimportant<ColorDist>::value)
+                                                       if(alpha_0_is_unimportant<ColorDist>::value || dxt == DXT1) // in DXT1, alpha 0 pixels are always skipped!
                                                        {
                                                                if(dxt == DXT5)
                                                                {