Explorar o código

Fix love.graphics.newTexture(imagedata, {canvas=true}) not using an sRGB format when it should

Alex Szpakowski %!s(int64=5) %!d(string=hai) anos
pai
achega
e0ff593d09
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/modules/graphics/Texture.cpp

+ 2 - 0
src/modules/graphics/Texture.cpp

@@ -194,6 +194,8 @@ Texture::Texture(const Settings &settings, const Slices *slices)
 		love::image::ImageDataBase *slice = slices->get(0, 0);
 
 		format = slice->getFormat();
+		if (sRGB)
+			format = getSRGBPixelFormat(format);
 
 		pixelWidth = slice->getWidth();
 		pixelHeight = slice->getHeight();