We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 649e5fe commit ce0a2e2Copy full SHA for ce0a2e2
1 file changed
utils/pvrtex/pvr_texture_encoder.c
@@ -859,7 +859,7 @@ void pteAutoSelectPixelFormat(PvrTexEncoder *pte) {
859
assert(pte);
860
assert(pte->src_img_cnt);
861
862
- unsigned clearpix = 0, halfpix = 0, opaquepix = 0;
+ unsigned clearpix = 0, halfpix = 0;
863
864
for(int j = 0; j < pte->src_img_cnt; j++) {
865
pteImage *img = pte->src_imgs + j;
@@ -868,10 +868,9 @@ void pteAutoSelectPixelFormat(PvrTexEncoder *pte) {
868
int a = img->pixels[i].a;
869
if (a == 0)
870
clearpix++;
871
- else if (a == 0xff)
872
- opaquepix++;
873
- else
+ else if (a != 0xff)
874
halfpix++;
+ //else: fully opaque, no count needed
875
}
876
877
0 commit comments