Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

phil_t

Member Since 06 Oct 2006
Online Last Active Today, 11:45 AM
*****

Topics I've Started

Problems with DXT compression and pre-multiplied alpha

29 March 2013 - 01:32 AM

I'm normally a big fan of pre-multiplied alpha, but I'm having some issues with using it with a certain texture.

 

Here's a screenshot to demonstrate the problem:

 

http://mtnphil.files.wordpress.com/2013/03/example1.png

 

The artifacts are obvious in the top image. If I don't compress the texture, I get the image on the bottom, which looks good.

In the middle is what happens if I use non-premultiplied alpha and DXT5. It looks pretty good (still a few small artifacts). I'm surprised it is so much better than pre-multiplied alpha.

 

Here is what the RGB and A channels look like for the DXT-compressed texture (grabbed from PIX):

http://mtnphil.files.wordpress.com/2013/03/dxt5_texture_in_pix.png

It looks as I would expect.

 

Other notes:

- I also tried DXT3, but there wasn't much difference in quality.

- No mipmaps are involved. All textures are drawn 1-to-1 texel-to-pixel.

- All screenshots are 3x.

 

Any idea what's going on here? I have a feeling the problem might go away if I had proper RGB values for the transparent parts, but I'm not sure how to make photoshop do that. (and if that were the problem, why would the non-premultiplied DXT scenario look fine?).

 

 


Like spherical harmonics, but 2D?

09 September 2012 - 11:37 AM

Would this just be plain old a fourier series? It's been a long time since my last math course.

Basically, I would like to have a small number of coefficients that I can use to represent a function that varies with the angle around a point in a 2d plane. This sounds like what spherical harmonics are often used for (global illumination affecting a point) but with one less dimension.

Could anyone suggest a website/tutorial somewhere that could show me how to do this? I have an engineering math background, but it's been about 15 years since I touched it :-).

PARTNERS