Open illwieckz opened 10 months ago
This affects any impact mark:
It's possible that this is the same underlying problem as https://github.com/DaemonEngine/Daemon/issues/906. Either one might be caused by the mark polys being generated insufficiently far in front of the surface.
This is supposed to be worked around by using polygonOffset
, but maybe the factor and offset that we use are wrong.
Creep has the SS_DECAL
sort order so it is drawn before almost all translucent surfaces. And it is treated as a translucent surface, so depth doesn't even matter since the dueling surfaces are both translucent.
So the renderer is working as designed here... but it's an old design based on heuristics that favor batching surfaces with a shared texture to improve speed at the cost of correctness.
With the material system, everything renders as we would like, yay! I think it might ignore fine-grained shader sorting distinctions?
Until very recently, the creep texture had only 0 or 1 alpha values. So we could have fixed it without changing the sort order by using depthWrite
in the shader. Now it has alpha that fades out at the edges so we couldn't do that.
I think it might ignore fine-grained shader sorting distinctions?
Yeah, it essentially skips this sort when adding surfaces since it just does R_AddWorldSurfaces()
, and then they either end up in the same material in the order they were received in or implicitly correctly sorted by material.
Creep is rendered behind the glass surface it should be over: