mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-29 15:41:59 +00:00
[vulkan] Set transparent color to black
I had forgotten that the draw pipeline expects pre-multiplied alpha, thus the pink background for the menu pics.
This commit is contained in:
parent
0953446c3e
commit
73e5ccd0d5
1 changed files with 6 additions and 1 deletions
|
@ -622,7 +622,12 @@ load_lmp (const char *path, vulkan_ctx_t *ctx)
|
||||||
__auto_type packet = QFV_PacketAcquire (ctx->staging);
|
__auto_type packet = QFV_PacketAcquire (ctx->staging);
|
||||||
int count = tex.width * tex.height;
|
int count = tex.width * tex.height;
|
||||||
byte *texels = QFV_PacketExtend (packet, 4 * count);
|
byte *texels = QFV_PacketExtend (packet, 4 * count);
|
||||||
Vulkan_ExpandPalette (texels, tex.data, vid.palette32, 2, count);
|
byte palette[256 * 4];
|
||||||
|
memcpy (palette, vid.palette32, sizeof (palette));
|
||||||
|
palette[255*4 + 0] = 0;
|
||||||
|
palette[255*4 + 1] = 0;
|
||||||
|
palette[255*4 + 2] = 0;
|
||||||
|
Vulkan_ExpandPalette (texels, tex.data, palette, 2, count);
|
||||||
QFV_PacketCopyImage (packet, cache_image->image.image,
|
QFV_PacketCopyImage (packet, cache_image->image.image,
|
||||||
tex.width, tex.height,
|
tex.width, tex.height,
|
||||||
&imageBarriers[qfv_LT_TransferDst_to_ShaderReadOnly]);
|
&imageBarriers[qfv_LT_TransferDst_to_ShaderReadOnly]);
|
||||||
|
|
Loading…
Reference in a new issue