@@ -382,6 +382,7 @@ pl_resource_load_ex(const char* pcName, plResourceLoadFlags tFlags, uint8_t* puO
382382
383383 bool bResizeNeeded = false;
384384 bool bGenerateMips = true;
385+ // bool bAttemptCompression = false;
385386 bool bAttemptCompression = true;
386387 plImageInfo tImageInfo = {0 };
387388 size_t szStagingOffset = 0 ;
@@ -614,6 +615,9 @@ pl_resource_load_ex(const char* pcName, plResourceLoadFlags tFlags, uint8_t* puO
614615 uint8_t uGreen = (ptPixel0 [1 ] + ptPixel1 [1 ] + ptPixel2 [1 ] + ptPixel3 [1 ]) / 4 ;
615616 uint8_t uBlue = (ptPixel0 [2 ] + ptPixel1 [2 ] + ptPixel2 [2 ] + ptPixel3 [2 ]) / 4 ;
616617 uint8_t uAlpha = (ptPixel0 [3 ] + ptPixel1 [3 ] + ptPixel2 [3 ] + ptPixel3 [3 ]) / 4 ;
618+ // uint8_t uAlpha = pl_max(ptPixel0[3], ptPixel1[3]);
619+ // uAlpha = pl_max(uAlpha, ptPixel2[3]);
620+ // uAlpha = pl_max(uAlpha, ptPixel3[3]);
617621
618622
619623 puDstBuffer [j * iCurrentWidth * 4 + i * 4 + 0 ] = uRed ;
@@ -647,7 +651,11 @@ pl_resource_load_ex(const char* pcName, plResourceLoadFlags tFlags, uint8_t* puO
647651 .uMipLevel = uMipLevel
648652 };
649653
650- gptGfx -> copy_buffer_to_texture (ptBlitEncoder , gptResourceManager -> tStagingBuffer .tStagingBufferHandle , tResource .tTexture , 1 , & tBufferImageCopy );
654+ gptGfx -> copy_buffer_to_texture (ptBlitEncoder ,
655+ gptResourceManager -> tStagingBuffer .tStagingBufferHandle ,
656+ tResource .tTexture ,
657+ 1 ,
658+ & tBufferImageCopy );
651659 szStagingOffset += szCurrentSize ;
652660 }
653661
0 commit comments