Skip to content

Commit

Permalink
Merge pull request GarageGames#121 from Azaezel/alpha40MonoColorMayhem
Browse files Browse the repository at this point in the history
getChanelValueAt 'correction'
  • Loading branch information
Areloch committed Nov 4, 2019
2 parents 864d40e + 6f647c2 commit 74ab886
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Engine/source/gfx/bitmap/gBitmap.cpp
Expand Up @@ -862,7 +862,10 @@ U8 GBitmap::getChanelValueAt(U32 x, U32 y, U32 chan)
{
ColorI pixelColor = ColorI(255,255,255,255);
getColor(x, y, pixelColor);

if (mInternalFormat == GFXFormatL16)
{
chan = 0;
}
switch (chan) {
case 0: return pixelColor.red;
case 1: return pixelColor.green;
Expand Down Expand Up @@ -1323,7 +1326,7 @@ U32 GBitmap::getSurfaceSize(const U32 mipLevel) const
if (mInternalFormat >= GFXFormatBC1 && mInternalFormat <= GFXFormatBC3)
{
// From the directX docs:
// max(1, width ÷ 4) x max(1, height ÷ 4) x 8(DXT1) or 16(DXT2-5)
// max(1, width ÷ 4) x max(1, height ÷ 4) x 8(DXT1) or 16(DXT2-5)

U32 sizeMultiple = 0;

Expand Down

0 comments on commit 74ab886

Please sign in to comment.