- adjustments and fixes for alphatextures:
* Instead of using the red channel it now uses the grayscale value. While slower in a few situations, it is also more precise and makes the feature more useful. * For paletted textures do not use the index as alpha anymore but the actual grayscaled color. This is again to make the feature more consistent and useful. * To compensate for the above there is now a list of hashes for known alpha textures in patch format, so that they don't get broken. * IMGZ is now considered a grayscale format. There's only two known textures that use IMGZ for something else than crosshairs and those are explicitly handled. * several smaller fixes. * the actual color conversion functions for paletted output are now consolidated in a small number of inlines so that future changes are easier to do. Note: This hasn't been tested yet and will need further changes in the hardware rendering code. As it is it is not production-ready.
This commit is contained in:
parent
b0c96ac43d
commit
b473838627
18 changed files with 220 additions and 104 deletions
|
|
@ -112,8 +112,7 @@ uint8_t *FFlatTexture::MakeTexture (FRenderStyle style)
|
|||
{
|
||||
memset (Pixels + numread, 0xBB, Width*Height - numread);
|
||||
}
|
||||
if (!(style.Flags & STYLEF_RedIsAlpha)) FTexture::FlipSquareBlockRemap (Pixels, Width, Height, GPalette.Remap);
|
||||
else FTexture::FlipSquareBlock(Pixels, Width, Height);
|
||||
FTexture::FlipSquareBlockRemap(Pixels, Width, Height, GetRemap(style));
|
||||
return Pixels;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue