rickomax / psxprev

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

Support semi-transpareny #70

Closed trigger-segfault closed 1 year ago

trigger-segfault commented 1 year ago

Semi-transparency is information used by HMD/TMD (and maybe more) models to determine the opacity to draw textures or surfaces at. Implementing this will require some rework of the current system, particularly because paletted TIM textures use the MSB of each color as the semi-transparency bit. This bit determines how to act with semi-transparency, and it's also relevant to whether a black surface should be hidden or not. Currently all black surfaces (using the default mask color) are hidden.

Steps to implement:

Preview: Figure A. Semi transparent surface is needed for the yellow glow to the left. Many surfaces on the right side of the building are transparency when they should be black. image

Figure B. Attempt at working semi-transparency. I don't think this is 100% correct, since the fade to black should be less noticeable. image

Figure C. Lighting enabled for propellers in the top left, but disabled for jet streams in the bottom right. image

trigger-segfault commented 1 year ago

This has been implemented by PR #77. All mixture rates (ABR) are supported, and all unsure behavior has been figured out.