dethrace-labs / dethrace

Reverse engineering the 1997 game "Carmageddon"
https://twitter.com/dethrace_labs
GNU General Public License v3.0
859 stars 44 forks source link

Implement transparency (blend tables) #280

Closed dethrace-labs closed 1 year ago

dethrace-labs commented 1 year ago

This implements index_blend materials, which work by blending the current frame buffer with the materials texture. Blended materials do not write to depth buffer. The game code renders all regular materials first, followed by all blended materials (see StripBlendedFaces).

Blend tables description: https://www.cwaboard.co.uk/viewtopic.php?p=105846&sid=58ad8910238000ca14b01dad85117175#p105846

Fixes #276

https://user-images.githubusercontent.com/78985374/212520089-88aef7ce-94ae-4752-bc87-112d59a9dd95.mov