WizzardMaker / S4GFX

A tool to extract Settlers 4 assets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Export shadows in alpha channel?

nyfrk opened this issue · comments

commented

Can we add a new export mode that exports the shadow mask as 50% transparent black and the transparency mask as 100% transparent?

Like this but with removeAlpha = alphaShadows = true:

if (red == 255 && green + blue == 0) {
   alpha = removeAlpha ? 0 : alpha;
}
if (green == 255 && red + blue == 0) {
   alpha = alphaShadows ? 0x80 : alpha;
   green = 0;
}

The game probably meant to render it that way too but it falls back to that checkerboard pattern presumably to save memory for the alpha channel:

image

Moreover the UI Engine seems to render shadows solid black. Maybe an additional mode for that would be nice too. Here is an example:

imageimage

Sure, that can be done