The "black-lines" bug has now been narrowed down.

The "black-lines" bug has now been narrowed down.

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

The "black-lines" bug has now been narrowed down.

Post by Argh »

Ignore this, see last posts.
Last edited by Argh on 07 Dec 2006, 13:53, edited 1 time in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Ignore this, see last posts.
Last edited by Argh on 07 Dec 2006, 13:54, edited 1 time in total.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

OMG! Further testing has revealed that the problem is definately related to the Anisotropic Filtering settings!

Forcing them to any value but "off", or setting them to "application controlled", results in the "black lines" bug. This only seems to be effecting things making use of AtlasedTexture, so I strongly suspect that the DDS file being auto-generated by Spring doesn't have all mip levels enabled- or there may be another problem.

nVidia card users, please test and verify that you can create this buggy drawing behavior by enabling/disabling Anisotropic Filtering for your video cards.

This is definitely it, though, at least with my hardware and drivers :-)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Aha! Anisotropic setting of 4X or higher works just fine. It's 2X and Application-controlled that's causing problems. Methinks that Spring is asking (or nVidia's driver is asking anything that doesn't ask specifically otherwise) for 2X Anisotropic filtering. Shutting it OFF results in best performance (by a wide margin) and 4X works just fine, but results in significant framerate hits. On my card (a 7800 AGP card) 4X is still well within acceptable framerate.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Hmm! Anti-Aliasing also causes this bug. Methinks that the DDS really must not be getting assigned mips correctly. Or that there are serious problems at low mip scales- maybe the smallest mip should be 1024? I know that AtlasedTexture is supposed to save on texture space, but I think that that's less important, in this case, than avoiding artifacts.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

It's to reduce texture switches (ie. one texture to render all projectiles instead of a different texture for each).

Also it doesn't have mipmapping enabled because that actually caused (more) artifacts.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Hmm. So, is it possible that forcing AA or AF is causing clamping problems or something? Because that's surely what it looks like. At least now I know for sure how I got rid of the problem in the first place... I'd quite forgotten that I'd had that bug, too, before I figured out how to get rid of it.
Post Reply

Return to “Engine”