andrei-drexler / ironwail

High-performance QuakeSpasm fork
GNU General Public License v2.0
560 stars 52 forks source link

[BUG] Transparency z-fighting in water brushes. (Regresion from 0.7.0) #358

Open drHyperion451 opened 4 days ago

drHyperion451 commented 4 days ago

Ironwail 0.7.0: https://github.com/user-attachments/assets/097d7902-6948-486e-b0bf-6e9ac6b851bb

Ironwail 0.8.0:

https://github.com/user-attachments/assets/4cbb7956-ba40-4ea4-8806-ce9ee32a0f90

How to replicate:

Go to the "start" map from the original, id1 game inside the episode 4 hall. Look at the water.

My specs:

CPU: 12th Gen Intel(R) Core(TM) i7-1255U, 1700 Mhz GPU: Intel Iris Xe Graphics (integrated) OGL 4.6 OS: Microsoft Windows 11 Pro Version10.0.22631 compilation 22631

andrei-drexler commented 3 days ago

This is a side effect of the optimized culling in 0.8 - it's much faster, but the polygon order varies more now. You can fix it by setting r_oit to 1 (or Graphics > Transparency: Modern). That does come with a performance cost though (especially on integrated GPUs), so I'll look into alternatives for a later update.

drHyperion451 commented 3 days ago

Thanks for the answer. I suggest renaming the cvar to something more clear like "r_optimized_culling" though, since I didn't know it existed in the first place.

andrei-drexler commented 3 days ago

The cvar doesn't control culling, it enables order-independent transparency (OIT), which means that even if culling produces polygons in a different order each frame, the blending is not affected.