devkitPro / opengx

OpenGL-like wrapper for Nintendo Wii/GameCube
19 stars 2 forks source link

Implement glAlphaFunc() and alpha test #45

Closed mardy closed 5 months ago

mardy commented 5 months ago

Contrary to what the comment was stating, there is no need for an additional TEV stage in order to implement alpha testing. It can be done almost trivially, since the GX API supports it. The only trick is to move the Z-comparison step after the texturing, and remember resetting it back during glClear().

davidgfnet commented 5 months ago

Interesting! Makes sense though, alpha testing seems quite configurable. LGTM!