百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

Direct3D-Rendering-Cookbook

> 编程语言
开源

Direct3D 渲染实用程序 - 伴随源代码

99 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

Direct3D 渲染实用程序 - 伴随源代码

Direct3D Rendering Cookbook - companion source code

This repository contains the up-to-date companion source code for my book Direct3D Rendering Cookbook published in January 2014 by Packt Publishing.

Any questions or issues can be posted in the issues

Update 2017-03-27: this repository has been updated to work with SharpDX 3.1.1. You can find the previous version of the source code that is used in the book here.

Build Instructions

To build all projects:

  1. open the relevant solution,
  2. restore NuGet packages (right click solution in solution explorer and select Restore NuGet Packages)
  3. right-click the root node within the Solution Explorer and select Rebuild Solution.

NOTE: If you get an error on Windows 10 and Visual Studio 2015 while trying to create the Direct3D device in debug mode, you may need to enable the DirectX Developer Runtime https://blogs.msdn.microsoft.com/chuckw/2015/08/05/where-is-the-directx-sdk-2015-edition/ or by running the command:

Dism /online /add-capability /capabilityname:Tools.Graphics.DirectX~~~~0.0.1.0

NOTE 2: If for some reason the MeshContentTask build target does not function correctly for you, the compiled assets are available separately from OneDrive, they just need to be copied to the correct build output location. You know if the MeshContentTask is not working when the *.fbx files do not get converted to *.cmo in your build output directory.


  • All desktop recipes (compatible with VS2012, VS2013 and VS2015): .\D3DRendering.sln

  • All Windows Store apps recipes (VS2013 only): .\D3DRendering.vs2013.WinRT.sln

  • D3DCompiler redistributable .\External


Shared projects:

  • Desktop apps

    .\Common\Common.csproj

  • Windows Store apps

    .\Common.WinRT\Common.WinRT.csproj


Chapter 1: Getting Started with Direct3D

  • Building a Direct3D 11 application with C# and SharpDX

    .\Ch01_01EmptyProject\

  • Initializing Direct3D 11.1 device and swap chain

    .\Ch01_02Direct3D11_1\

  • Debugging your Direct3D application

    .\Ch01_03Debugging\



Chapter 2: Rendering with Direct3D

  • Building a simple rendering framework

    .\Common\Common.csproj

  • Rendering primitives

    .\Ch02_01RenderingPrimitives\

  • Adding texture

    .\Ch02_02AddingTexture\


Chapter 3: Rendering Meshes

  • Cube and Sphere

    .\Ch03_01CubeAndSphere\

  • Material and Lighting

    .\Ch03_02MaterialAndLighting\

  • Material and Lighting with cube mapping

    .\Ch03_02WithCubeMapping\

  • Load mesh from file

    .\Ch03_03LoadMesh\


Chapter 4: Animating Meshes with Vertex Skinning

  • Vertex Skinning

    .\Ch04_01VertexSkinning\

  • Bone Animation

    .\Ch04_02Animate\


Chapter 5: Applying Hardware Tessellation

  • Tessellation basics

    .\Ch05_01TessellationPrimitives\

  • Tessellation of a mesh

    .\Ch05_02TessellatedMesh\


Chapter 6: Adding Surface Detail with Normal and Displacement Mapping

  • Displacement Mapping

    .\Ch06_01DisplacementMapping\

    .\Ch06_01DisplacementMapping_TangentSpace\

  • Displacement Decals

    .\Ch06_02DisplacementDecals\


Chapter 7: Performing Image Processing Techniques

  • Image processing (compute shaders)

    .\Ch07_01ImageProcessing\


Chapter 8: Incorporating Physics and Simulations

  • Physics (with BulletSharp)

    .\Ch08_01Physics\

  • Particles (compute shaders with append\consume buffers)

    .\Ch08_02Particles\


Chapter 9: Rendering on Multiple Threads and Deferred Contexts

  • Multithreaded rendering - benchmark

    .\Ch09_01Benchmark\

  • Multithreaded Dynamic Cube Environment Map

    .\Ch09_02DynamicCubeMapping\

  • Multithreaded Dual Paraboloid Environment Mapping

    .\Ch09_03DualParaboloidMapping\


Chapter 10: Implementing Deferred Rendering

  • Deferred rendering

    .\Ch10_01DeferredRendering\

    • NOTE: the textures for the CryTek Sponza scene can be downloaded from the CryTek CryENGINE 3 downloads page or directly here. These should then be placed into the directory: .\Ch10_01DeferredRendering\textures

      The project will also compile and render without these textures


Chapter 11: Integrating Direct3D with XAML and Windows 8.1

  • Direct3D CoreWindow Windows Store app

    .\Ch11_01HelloCoreWindow\

  • Direct3D SwapChainPanel Windows Store app

    .\Ch11_02HelloSwapChainPanel\

  • Loading resources asynchronously

    .\Ch11_03CreatingResourcesAsync\

    • NOTE: If you do not see the model, clean and rebuild the project again. This is because the .cmo file does not yet exist the first time you build. Cleaning and building again will correctly add the model to the Windows Store apps' AppX package.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言