Direct3D 12 编程---(1)

什么是Direct3D 12?

  DirectX 12 引入了下一版本的 Direct3D—它是 DirectX 的核心 3D 图形 API。 Direct3D 12 比以前的任何版本都更快更高效。 Direct3D 12 提供更丰富的场景、更多的对象、更复杂的效果,并且能全面利用现代 GPU 硬件。

https://docs.microsoft.com/zh-cn/windows/win32/direct3d12/directx-12-programming-environment-set-up?redirectedfrom=MSDN    

//Direct3D 12 编程环境设置

https://github.com/microsoft/DirectX-Graphics-Samples    //学习示例

https://github.com/microsoft/DirectXMesh     https://github.com/microsoft/DirectXMesh/wiki      //DirectXMesh

 

https://github.com/microsoft/UVAtlas    https://github.com/microsoft/UVAtlas/wiki         // UVAtlastool

UVAtlastool

This UVAtlas sample is an implementation of the uvatlas command-line sample from the legacy DirectX SDK using UVAtlas, DirectXTex, and DirectXMesh

rather than the deprecated D3DX library. This tool imports geometry and generates an isochart mesh.

 

Usage: uvatlas <options> <files>

   Input file type must be Wavefront Object (.obj)

 

   Output file type:

       -sdkmesh        DirectX SDK .sdkmesh format (default)

       -sdkmesh2       .sdkmesh format version 2 (PBR materials)

       -cmo            Visual Studio Content Pipeline .cmo format

       -vbo            Vertex Buffer Object (.vbo) format

       -wf             WaveFront Object (.obj) format

 

   -r                  wildcard filename search is recursive

   -q <level>          sets quality level to DEFAULT, FAST or QUALITY

   -n <number>         maximum number of charts to generate (def: 0)

   -st <float>         maximum amount of stretch 0.0 to 1.0 (def: 0.16667)

   -g <float>          the gutter width betwen charts in texels (def: 2.0)

   -w <number>         texture width (def: 512)

   -h <number>         texture height (def: 512)

   -ta | -ga           generate topological vs. geometric adjancecy (def: ta)

   -nn | -na | -ne     generate normals weighted by angle/area/equal

   -tt                 generate tangents

   -tb                 generate tangents & bi-tangents

   -cw                 faces are clockwise (defaults to counter-clockwise)

   -ib32               use 32-bit index buffer (SDKMESH only)

   -c                  generate mesh with colors showing charts

   -t                  generates a separate mesh with uvs - (*_texture)

   -it <filename>      calculate IMT for the mesh using this texture map

   -iv <channel>       calculate IMT using per-vertex data

                       NORMAL, COLOR, TEXCOORD

   -nodds              prevents extension renaming in exported materials

   -flip               reverse winding of faces

   -flipu              inverts the u texcoords

   -flipv              inverts the v texcoords

   -flipz              flips the handedness of the positions/normals

   -o <filename>       output filename

   -y                  overwrite existing output file (if any)

   -nologo             suppress copyright message

   -flist <filename>   use text file with a list of input files (one per line)

 注:  

    第二个参数为展uv 质量控制; UVAtlas.h  

 // These options are only valid for UVAtlasCreate and UVAtlasPartition
    // UVATLAS_DEFAULT - Meshes with more than 25k faces go through fast, meshes with fewer than 25k faces go through quality
    // UVATLAS_GEODESIC_FAST - Uses approximations to improve charting speed at the cost of added stretch or more charts.
    // UVATLAS_GEODESIC_QUALITY - Provides better quality charts, but requires more time and memory than fast.
    enum UVATLAS
    {
        UVATLAS_DEFAULT = 0x00,
        UVATLAS_GEODESIC_FAST = 0x01,
        UVATLAS_GEODESIC_QUALITY = 0x02,
        UVATLAS_PARTITIONVALIDBITS = 0x03,
    };

posted @ 2020-03-24 16:54  玥茹苟  阅读(631)  评论(0编辑  收藏  举报