I wrote an article to explain the issue way back when: Alpha sorting and masking in Second Life.
So this time around, I thought I'd go into a viewer setting called "Automatic alpha masks" which is accessible off your Advanced menu (CTRL-ALT-D / Rendering). There are two choices, Automatic alpha masks (deferred) and Automatic alpha masks (non-deferred).
While on the one hand, hair looks better with non-deferred and horrible with deferred, other prims show texture fighting against semi-transparent backgrounds.
BTW, these settings used to be called Fast Alphas but the nomenclature was changed to make the intent more obvious.
So the point of the JIRA mentioned above is that the alphas need to be controlled by the creator, not by an arbitrary setting that may or may not apply to the original creator's intent.
Just to get even more anal about this, I did some photos of my own to show the edging effects of various textures and settings (just thought I'd use a basic Torley Linden color scheme here). These should display as crossed circles just like my old article. I tried 3 different types of textures -- TGA with alpha, PNG with transparency and PNG-8 with 1-bit transparency. To see the effects up close, click the photo to view at full size. I tried this with 256x256 pixel textures and with 1024x1024.
|Default viewer settings - 256x256 TGA, PNG and PNG-8 crossed circles.|
|Automatic alpha mask - Deferred.|
|Default viewer - PNG|
|Automatic alpha deferred - PNG|
|Default viewer - PNG 1024x1024|
|Automatic alpha deferred - PNG 1024x1024|
Obviously the worst of the bunch was the PNG-8 with 1-bit alpha (transparency) which ends up with a white edge when rendered with Automatic alphas on (picture #2). And, to be fair, these hard geometric shapes render the best under automatic alphas. Regardless, there is a fair amount of down-sampling going on in all (thus the jaggies). The down-sampling was why the setting used to be called Fast Alpha -- the smaller images rendered faster. Not so much a factor with today's much better graphics cards.
More subtle images, such as deliberate drop shadows render very poorly with auto-masking. Here's a screen shot from JIRA MAINT-651 showing this effect:
|Left - pre-upload, Center - no auto alpha, Right - deferred.|
So the real solution, which has so far been avoided by Linden Lab, is to allow the creator to upload textures as they choose and designate the alpha type on a per-face basis. Given that fixing the z-buffer sorting issues are probably not going to happen, this really is the second best approach. IMHO.
(Good lord I've become geeky in my 5 years on SL. Eeek!)
As always, corrections and comments are welcome.
Because of the apparent confusion over the PNG-8 format, I'm adding a few piccies to show what's up with it. :)
First I made a pink circle using a shape with pink fill in Photoshop. Next I SAVED it for Web & Devices using PNG-8, No Dither, Transparency, No Transparency Dither, Matte: None, Colors 256. This brought the output file down to just two colors. Pink (well fuschia really) and transparent. Size of final file was 256x256 pixels.
|PNG-8 Source Image (see text above)|
|PNG-8 texture placed on prim and viewed against black background. Viewer set to normal.|
|PNG-8 texture placed on prim and viewed against black background. Viewer set to auto alpha mask (non-deferred)|
BTW, if you're going to use PNG with transparency for clothes or whatever, matte your output into whatever the main color of item is. If it's red, use red as a matte. Blue use blue. Etc. Or use black. This will at least avoid some of the white halo effect. But it won't work quite as well as TGA with alpha blended using something like Solidify in Photoshop.