# What is this sorcery?
A collection of *DirectX 12 C# samples* from Frank D. Luna's book [Introduction to 3D Game Programming with Direct3D 12.0](http://d3dcoder.net/d3d12.htm). All the samples have been ported to .NET using [SharpDX](http://sharpdx.org/).
# Building
The samples will compile with Visual Studio 2015+ and run on Windows 10 with DirectX 12 capable graphics hardware.
# Samples
The number prefix for sample name indicates its corresponding chapter from the book.
Note that there might be issues: some which are inherited from the original C++ samples and some which have been introduced during the porting process. All known issues are listed in the [issues section](https://github.com/discosultan/dx12-game-programming/issues).
## [04-InitDirect3D](Samples/04-InitDirect3D)
<img src="./Images/InitDirect3D.jpg" height="96px" align="right">
Sets up a window using WinForms. Initializes Direct3D 12 and builds a base app with game loop upon which next samples are built.
## [06-Box](Samples/06-Box)
<img src="./Images/Box.jpg" height="96px" align="right">
Manually defines vertices to render a colored box. Scene can be rotated and zoomed using mouse buttons.
## [07-Shapes](Samples/07-Shapes)
<img src="./Images/Shapes.jpg" height="96px" align="right">
Generates geometric primitives. Renders multiple objects using a single vertex and index buffer.
<br><br>
## [07-LandAndWaves](Samples/07-LandAndWaves)
<img src="./Images/LandAndWaves.jpg" height="96px" align="right">
Constructs a heightmap based terrain and water geometry using a dynamic vertex buffer.
<br><br>
## [08-LitWaves](Samples/08-LitWaves)
<img src="./Images/LitWaves.jpg" height="96px" align="right">
Adds ambient, diffuse and specular lighting to the land and waves scene.
<br><br>
## [08-LitColumns](Samples/08-LitColumns)
<img src="./Images/LitColumns.jpg" height="96px" align="right">
Introduces parsing and loading a skull mesh from a custom model format. Applies lighting to the shapes scene.
## [09-Crate](Samples/09-Crate)
<img src="./Images/Crate.jpg" height="96px" align="right">
Textures a box with uv-coordinates added to its vertices.
<br><br>
## [09-TexWaves](Samples/09-TexWaves)
<img src="./Images/TexWaves.jpg" height="96px" align="right">
Animates a water texture in the land and waves scene.
<br><br>
## [09-TexColumns](Samples/09-TexColumns)
<img src="./Images/TexColumns.jpg" height="96px" align="right">
Textures objects in the shapes scene.
<br><br>
## [10-Blend](Samples/10-Blend)
<img src="./Images/Blend.jpg" height="96px" align="right">
Renders the land and waves scene with transparent water and a wire fence textures. Introduces the blending formula and creates a fog effect.
## [11-Stencil](Samples/11-Stencil)
<img src="./Images/Stencil.jpg" height="96px" align="right">
Constructs a mirror using the stencil buffer and projects a shadow for the skull mesh.
<br><br>
## [12-TreeBillboards](Samples/12-TreeBillboards)
<img src="./Images/TreeBillboards.jpg" height="96px" align="right">
Renders trees as billboards. Introduces texture arrays and alpha to coverage in relation to MSAA.
<br><br>
## [13-VecAdd](Samples/13-VecAdd)
Sums a bunch of vectors on GPU instead of CPU for high parallelism using a compute shader. Outputs a *results.txt* file instead of rendering to screen.
## [13-WavesCS](Samples/13-WavesCS)
<!-- This sample looks exactly the same as 10-Blend -->
<img src="./Images/Blend.jpg" height="96px" align="right">
Uses a compute shader to update the land and waves scene waves simulation on GPU instead of CPU.
## [13-Blur](Samples/13-Blur)
<img src="./Images/Blur.jpg" height="96px" align="right">
Applies a Gaussian blur post-processing effect using a compute shader to the land and waves scene.
## [13-SobelFilter](Samples/13-SobelFilter)
<img src="./Images/SobelFilter.jpg" height="96px" align="right">
Applies a Sobel filter post-processing effect using a compute shader to the land and waves scene to render outlines for geometry.
## [14-BasicTessellation](Samples/14-BasicTessellation)
<img src="./Images/BasicTessellation.jpg" height="96px" align="right">
Tessellates a quad using 4 control points.
<br><br>
## [14-BezierPatch](Samples/14-BezierPatch)
<img src="./Images/BezierPatch.jpg" height="96px" align="right">
Tessellates a quad using 16 control points cubic Bézier surface.
<br><br>
## [15-CameraAndDynamicIndexing](Samples/15-CameraAndDynamicIndexing)
<img src="./Images/CameraAndDynamicIndexing.jpg" height="96px" align="right">
Creates a controllable first person camera. Introduces dynamic indexing of texture arrays. Camera is moved using WASD keys and rotated using a mouse.
## [16-InstancingAndCulling](Samples/16-InstancingAndCulling)
<img src="./Images/InstancingAndCulling.jpg" height="96px" align="right">
Renders multiple copies of the skull mesh using a hardware instanced draw call. Culls skulls outside of camera frustum.
## [17-Picking](Samples/17-Picking)
<img src="./Images/Picking.jpg" height="96px" align="right">
Enables picking individual triangles of a car mesh. Right mouse button picks a triangle which is highlighted using a yellow color.
## [18-CubeMap](Samples/18-CubeMap)
<img src="./Images/CubeMap.jpg" height="96px" align="right">
Renders a sky texture cube. Uses the cube to render reflections on scene objects.
<br><br>
## [18-DynamicCube](Samples/18-DynamicCube)
<img src="./Images/DynamicCube.jpg" height="96px" align="right">
Renders scene objects into a texture cube every frame. Uses the rendered cube for reflections.
<br><br>
## [19-NormalMap](Samples/19-NormalMap)
<img src="./Images/NormalMap.jpg" height="96px" align="right">
Makes use of normal maps in addition to diffuse maps to generate more realistic lighting of surfaces.
## [20-Shadows](Samples/20-Shadows)
<img src="./Images/Shadows.jpg" height="96px" align="right">
Projects shadows into a shadow map which is blended with the diffuse target.
<br><br>
## [21-Ssao](Samples/21-Ssao)
<img src="./Images/Ssao.jpg" height="96px" align="right">
Computes real-time screen space ambient occlusion and applies it as a post-processing effect.
<br><br>
## [22-Quaternions](Samples/22-Quaternions)
<img src="./Images/Quaternions.jpg" height="96px" align="right">
Animates skull rotation using quaternions.
<br><br>
## [23-SkinnedMesh](Samples/23-SkinnedMesh)
<img src="./Images/SkinnedMesh.jpg" height="96px" align="right">
Plays a walking animation for an animated skinned soldier mesh loaded from *.m3d* format.
没有合适的资源?快使用搜索试试~ 我知道了~
来自 Frank D. Luna 的“ Direct3D 12.0 3D游戏编程简介”一书中的 DirectX 12 C#示例
共401个文件
cs:164个
hlsl:83个
config:56个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 137 浏览量
2022-06-23
11:30:44
上传
评论
收藏 35.04MB ZIP 举报
温馨提示
_C#_代码_下载 Introduction to 3D Game Programming with Direct3D 12.0 这些示例将使用 Visual Studio 2015+ 进行编译,并在具有 DirectX 12 功能的图形硬件的 Windows 10 上运行。 样品 样本名称的数字前缀表示其在书中对应的章节。 更多详情、使用方法,请下载后阅读README.md文件
资源推荐
资源详情
资源评论
收起资源包目录
来自 Frank D. Luna 的“ Direct3D 12.0 3D游戏编程简介”一书中的 DirectX 12 C#示例 (401个子文件)
tree1.bmp 1MB
tree2.bmp 1MB
tree0.bmp 1MB
App.config 519B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 439B
packages.config 360B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 181B
App.config 177B
SkinnedMeshApp.cs 58KB
SsaoApp.cs 55KB
ShadowsApp.cs 44KB
DynamicCubeApp.cs 42KB
SobelFilterApp.cs 42KB
StencilApp.cs 41KB
TreeBillboardsApp.cs 36KB
WavesCSApp.cs 36KB
BlurApp.cs 36KB
BlendApp.cs 33KB
CubeMapApp.cs 32KB
QuaternionsApp.cs 32KB
PickingApp.cs 31KB
TextureUtilities.cs 30KB
TexWavesApp.cs 30KB
NormalMapApp.cs 30KB
InstancingAndCullingApp.cs 29KB
CameraAndDynamicIndexingApp.cs 26KB
TexColumnsApp.cs 26KB
LitColumnsApp.cs 24KB
BezierPatchApp.cs 24KB
GeometryGenerator.cs 24KB
BasicTessellationApp.cs 23KB
CrateApp.cs 23KB
LitWavesApp.cs 23KB
D3DApp.cs 22KB
ShapesApp.cs 22KB
LandAndWavesApp.cs 21KB
Ssao.cs 17KB
Ssao.cs 17KB
M3DLoader.cs 14KB
D3DUtil.cs 13KB
BoxApp.cs 13KB
GpuWaves.cs 11KB
GpuWaves.cs 11KB
BlurFilter.cs 9KB
VecAddApp.cs 7KB
FrameResource.cs 6KB
Waves.cs 6KB
Waves.cs 6KB
Waves.cs 6KB
共 401 条
- 1
- 2
- 3
- 4
- 5
资源评论
- wjl_19942023-06-08资源内容总结地很全面,值得借鉴,对我来说很有用,解决了我的燃眉之急。
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
- 林周瑜-论文.docx
- 基于MIC+NE555光敏电阻的声光控电路Multisim仿真原理图
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功