Can you manage something like this?

JDoom

GZDoom + Smooth sprite edges
Thanks.
Moderator: Graf Zahl
Sussudio wrote:Hmm, no luck with gl_mask_threshold. What does it do anyways?
Just look at the pictures, can you tell the differences between the edges of the cacodemon sprites?
Actually, I don't depth sort non-translucent geometry. Every test I made indicates that sorting by texture yields better results than sorting by depth.Chris wrote:Though personally I prefer the latter look. It also bugs me when sprite edges blur with what's behind it (and from a technical stand-point, masked sprites like that perform better if the edges don't blend with the background, since they can be sorted near to far with depth testing/writing, reducing overdraw, and the card doesn't have to do additional work to alpha blend them).
Thanks, can't wait for the next svnGraf Zahl wrote:Yeah, I noticed that it wasn't used in the place where sprites are drawn. Since I probably had a good reason for that I added a new CVAR, gl_mask_sprite_threshold. Set this to a very small positibve value (not 0!) and you should get what you want.
I remember reading once about a technique that was used.. you would do a depth-only render pass first, since disabling color-writes would let it work very fast (no fancy per-pixel lighting calculations, bump-mapping, or other pixel shader effects). The opaque/masked surfaces would then have zero overdraw when color writing was re-enabled, and as long as the color-enabled pixel shaders don't write a depth value, OpenGL can early-out and skip the shader processing for pixels that are hidden. And when you have processing-heavy pixel shaders, 16x Aniso Filtering, etc, trying to cut as many unseen pixels you can from being processed will vastly improve speed. Obviously, though, it won't benefit surfaces that use alpha blending (eg. sprites/textures with blurry edges vs sharp edges, and translucent geometry and textures).. those still need to be sorted far to near and drawn over top of the opaque/masked scene.Graf Zahl wrote:Actually, I don't depth sort non-translucent geometry. Every test I made indicates that sorting by texture yields better results than sorting by depth.Chris wrote:Though personally I prefer the latter look. It also bugs me when sprite edges blur with what's behind it (and from a technical stand-point, masked sprites like that perform better if the edges don't blend with the background, since they can be sorted near to far with depth testing/writing, reducing overdraw, and the card doesn't have to do additional work to alpha blend them).