Jump to content

DXT5nm and 3Dc DDS compression


BrokenPillar
 Share

Recommended Posts

One other option is to still use the blue for the z information (the blue channel is unused with the current code). Here a few options that would only require minor tweaks to the code you posted:

 

1. Store the normal map in the Green (y), Blue (z) and Alpha (x). Store the Spec Map in the Red (the Spec map gets compressed pretty bad this way, but it didn't seem to make a noticeable difference in my tests). This option would take the exact same amount of texture memory as the current method, not need the extra square root function Josh was worried about, and still gives results much closer to using uncompressed normal maps.

 

2. Store the normal in the Green (y), and Alpha (x), and derive the Z value using the math function (still need to figure out what is going on with the + or -). Store the Spec in the Red. This method gives similar results as option 1.

 

3. Do the normal map the same as option 1 or 2, but store the Spec Map in a separate texture or the alpha of the diffuse texture (for diffuse textures without transparency). This would increase the required texture memory by the size of the Spec Map, but would eliminate the Spec Map compression artifacts that come with storing it in the Red channel. It would also help with the problem described in your earlier post about storing different information in each channel (although the difference between storing all three channels the same vs having them different was negligible in my tests).

Vista | AMD Dual Core 2.49 GHz | 4GB RAM | nVidia GeForce 8800GTX 768MB

Online Portfolio | www.brianmcnett.com

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...