rickomax / psxprev

PSXPREV - Playstation (PSX) Files Previewer/Extractor
BSD 2-Clause "Simplified" License
193 stars 10 forks source link

Fix texture pages exporting with semi-transparency section #90

Closed trigger-segfault closed 11 months ago

trigger-segfault commented 11 months ago

Textures now have a new property IsVRAMPage, which states if its used directly in rendering (and has a semi-transparency section). A new function VRAMPages.GetTextureOnly has been added, which returns a texture page bitmap without the transparency section. This is used by PngExporter when IsVRAMPage is true.

Additionally, textures now store transparent black with alpha=0. This means exported textures can preserve mask information (although this will not honor changes to Mask Color). This also affects how texture pages look in the VRAM tab, as black transparent pixels will now be transparent and show the color behind the PictureBox.