Normalmap's DDS Compression

Source: Internet
Author: User
There is a picture of the DDS compression of normal map to illustrate the problem:

We can note that after the common dtx5 compression, the illumination details of those particles are greatly lost, And the raster phenomenon is also very serious.

At the same time, we can see that dxt5_nm saves the details well when the file size is the same.

 

Swizzled dxt5 format: It is basically dxt5 format, but the X value is put to a, and the Y value is put to G, R/B channel can be ignored, the reason is that the dxt5 compression feature makes the/G channel Compression Quality relatively high. The quality is much better than simply saving dxt5 to XYZ.

3dc: Only AMD (ATI) GPU is supported currently. The effect should be better than that of swizzled dxt5. (Because there is no ATI card at hand, there is no way to compare it)

 


The dxt1 compressed normal map on the right shows noticeable
Blocking artifacts compared to the original normal map on the left.

 


The dxt5 compressed normal map on the right
Compared to the original normal map on the left.


The dxt5 compressed normal map with re-Normalization On
The right compared to the original normal map on the left.

 

Keyword: 3dc dxt5_nm swizzle

I didn't see direct support for dxt5_nm in d3d. I used nvtt to generate normalmap in dxt5_nm format. Because xy = Ag, r = 1, the color is orange.

 

Processing in the shader

Float3 fvnormal;
Fvnormal. XY = (Tex2d (normalmap, texcoord). AG *   2.0f   -   1.0f ); fvnormal. z = SQRT ( 1.0 - dot (fvnormal. XY, fvnormal. XY ));

rendering effect

link:

http://codefield.blogspot.com/2007/04/normal-map_6771.html

http://www.ozone3d.net/tutorials/bump_map_compression_p3.php#z_generation

http://code.google.com/p/nvidia-texture-tools/wiki/NormalMapCompression

http://developer.nvidia.com/object/real-time-normal-map-dxt-compression.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.