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:
[x] Preserve semi-transparency bit information in paletted TIM images.
[x] Store semi-transparency driver settings for HMD and TMD models (some models may need to be split up).
[x] Semi-transparency needs to be handled in a separate pass after opaque models. This pass should disable depth write and enable blending.
[x] The frag shader needs to be changed to process semi-transparency.
[ ] It seems lighting should be disabled when drawing semi-transparent models. Note that this goes against the driver lighting bit which is unset (lighting enabled) There's one exception I've noticed, and I think propeller blades I encountered needed lighting. The only difference I found between those that did and didn't was that the gouraud bit was set for semi-transparent models that needed lighting. Edit: I think I was wrong.
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.
Figure B. Attempt at working semi-transparency. I don't think this is 100% correct, since the fade to black should be less noticeable.
Figure C. Lighting enabled for propellers in the top left, but disabled for jet streams in the bottom right.
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:
There's one exception I've noticed, and I think propeller blades I encountered needed lighting. The only difference I found between those that did and didn't was that the gouraud bit was set for semi-transparent models that needed lighting.Edit: I think I was wrong.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.
Figure B. Attempt at working semi-transparency. I don't think this is 100% correct, since the fade to black should be less noticeable.
Figure C. Lighting enabled for propellers in the top left, but disabled for jet streams in the bottom right.