Closed Paril closed 3 years ago
Blended draw elements are drawn after all opaque ones (across all inline models, including world). SURF_DECAL might be disabling depth test, and that would explain what you're seeing here.
I'm not sure if this decal in particular is SURF_ALPHA_TEST or not, that's the only one that actually enables depthmask during draw elements. Again too this only occurs with depth pass enabled.
It's not SURF_ALPHA_TEST
. It's SURF_BLEND_100 | SURF_DECAL
. Decals are excluded from R_BlendDepthForPoint
but are still back-to-front sorted so that e.g. even decals on glass will work correctly. So the state leak here might have nothing to do with this decal, but it might just be manifesting on it.
Okay, so.. been looking into this. There are a few things going on. I've found and fixed a state leak with materials stages on blended elements (the water on Tokays is blend and also has stages). I've also noticed that this particular inline model has SURF_ALPHA_TEST
elements: the "holes" where the cable goes through are actually 1u thick "decal" type faces with alpha test. They weren't even showing up in-game. I've fixed that, but they're killing the faces behind them:
This is all fixed up now. The "cable holes" were killing the faces behind them because the .map had CONTENTS_SOLID
explicitly set on some of the faces, rather than letting them auto-set to CONTENTS_WINDOW
by quemap. I'll make sure to re-fix that when I absorb @Panjoo's updated .map files.
This decal also disappears if you're under the water way below. Both issues do not occur with r_depth_pass 0.