Directx11 tutorial (32) Texture ing (2)

Source: Internet
Author: User

Before writingCodePreviously, we made a DDS file. I found a picture on the Internet, processed it as 512*512, and saved it as JPG.

After Microsoft's DirectX texture tool is started, drag the image to it:

Select the file format-> Generate MIP maps. You can see the word MIP 1 of 10 in the title bar of the image. This is because the size of the original image is 512*512, 256*256,128*128 ,..., 1*1. A series of subsampled images, plus 10 original images in total.

We can use the up/down flip key to view these images.

We know that d3d11 contains BC1, BC2 ,..., Bc6 and bc7 are supported in a total of 7 texture compression formats. texture images are usually large. If the compression format is not used, loading will take up a lot of bandwidth.

Now we select format-> change surface format. We can see some compression formats, such as dxt1, dxt2 ,..., Dxt5: these formats are actually d3d9 compression formats. dxt1 corresponds to BC1, dxt2, and dxt3 corresponds to BC2, dxt4, and dxt5 correspond to bc3.

Select the dxt5 format and save the file as the DDS format.

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.