Direct3D Rendering Cookbook

For C# .NET developers this is the ultimate cookbook for Direct3D rendering in PC games. Covering all the latest innovations, it teaches everything from debugging to character animation, supported throughout by illustrations and sample code.
Preview in Mapt

Direct3D Rendering Cookbook

Justin Stenning

1 customer reviews
For C# .NET developers this is the ultimate cookbook for Direct3D rendering in PC games. Covering all the latest innovations, it teaches everything from debugging to character animation, supported throughout by illustrations and sample code.
Mapt Subscription
FREE
$29.99/m after trial
eBook
$23.10
RRP $32.99
Save 29%
Print + eBook
$54.99
RRP $54.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$23.10
$54.99
$29.99p/m after trial
RRP $32.99
RRP $54.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Direct3D Rendering Cookbook Book Cover
Direct3D Rendering Cookbook
$ 32.99
$ 23.10
Blender Cycles: Lighting and Rendering Cookbook Book Cover
Blender Cycles: Lighting and Rendering Cookbook
$ 29.99
$ 21.00
Buy 2 for $35.00
Save $27.98
Add to Cart
Subscribe and access every Packt eBook & Video.
 
  • 5,000+ eBooks & Videos
  • 50+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 

Book Details

ISBN 139781849697101
Paperback430 pages

Book Description

The latest 3D graphics cards bring us amazing visuals in the latest games, from Indie to AAA titles. This is made possible on Microsoft® platforms including PC, Xbox consoles, and mobile devices thanks to Direct3D – a component of the DirectX API dedicated to exposing 3D graphics hardware to programmers. Microsoft DirectX is the graphics technology powering all of today's hottest games. The latest version— DirectX 11—features tessellation for film-like geometric detail, compute shaders for custom graphics effects, and improved multithreading for better hardware utilization. With it comes a number of fundamental game changing improvements to the way in which we render 3D graphics.

Direct3D Rendering Cookbook provides detailed .NET examples covering a wide range of advanced 3D rendering techniques available in Direct3D 11.2. With this book, you will learn how to use the new Visual Studio 2012 graphics content pipeline, how to perform character animation, how to use advanced hardware tessellation techniques, how to implement displacement mapping, perform image post-processing, and how to use compute shaders for general-purpose computing on GPUs.

After covering a few introductory topics about Direct3D 11.2 and working with the API using C# and SharpDX, we quickly ramp up to the implementation of a range of advanced rendering techniques, building upon the projects we create and the skills we learn in each subsequent chapter. Topics covered include using the new Visual Studio 2012 graphics content pipeline and graphics debugger, texture sampling, normal mapping, lighting and materials, loading meshes, character animation (vertex skinning), hardware tessellation, displacement mapping, using compute shaders for post-process effects, deferred rendering, and finally bringing all of this to Windows Store Apps for PC and mobile. After completing the recipes within Direct3D Rendering Cookbook, you will have an in-depth understanding of a range of advanced Direct3D rendering topics.

Table of Contents

Chapter 1: Getting Started with Direct3D
Introduction
Introducing Direct3D 11.1 and 11.2
Building a Direct3D 11 application with C# and SharpDX
Initializing a Direct3D 11.1/11.2 device and swap chain
Debugging your Direct3D application
Chapter 2: Rendering with Direct3D
Introduction
Using the sample rendering framework
Creating device-dependent resources
Creating size-dependent resources
Creating a Direct3D renderer class
Rendering primitives
Applying multisample anti-aliasing
Implementing texture sampling
Chapter 3: Rendering Meshes
Introduction
Rendering a cube and sphere
Preparing the vertex and constant buffers for materials and lighting
Adding material and lighting
Using a right-handed coordinate system
Loading a static mesh from a file
Chapter 4: Animating Meshes with Vertex Skinning
Introduction
Preparing the vertex shader and buffers for vertex skinning
Loading bones in the mesh renderer
Animating bones
Chapter 5: Applying Hardware Tessellation
Introduction
Preparing the vertex shader and buffers for tessellation
Tessellating a triangle and quad
Tessellating bicubic Bezier surfaces
Refining meshes with Phong tessellation
Optimizing tessellation through back-face culling and dynamic Level-of-Detail
Chapter 6: Adding Surface Detail with Normal and Displacement Mapping
Introduction
Referencing multiple textures in a material
Adding surface detail with normal mapping
Adding surface detail with displacement mapping
Implementing displacement decals
Optimizing tessellation based on displacement decal (displacement adaptive tessellation)
Chapter 7: Performing Image Processing Techniques
Introduction
Running a compute shader – desaturation (grayscale)
Adjusting the contrast and brightness
Implementing box blur using separable convolution filters
Implementing a Gaussian blur filter
Detecting edges with the Sobel edge-detection filter
Calculating an image's luminance histogram
Chapter 8: Incorporating Physics and Simulations
Introduction
Using a physics engine
Simulating ocean waves
Rendering particles
Chapter 9: Rendering on Multiple Threads and Deferred Contexts
Introduction
Benchmarking multithreaded rendering
Implementing multithreaded dynamic cubic environment mapping
Implementing dual paraboloid environment mapping
Chapter 10: Implementing Deferred Rendering
Introduction
Filling the G-Buffer
Implementing a screen-aligned quad renderer
Reading the G-Buffer
Adding multiple lights
Incorporating multisample anti-aliasing
Chapter 11: Integrating Direct3D with XAML and Windows 8.1
Introduction
Preparing the swap chain for a Windows Store app
Rendering to a CoreWindow
Rendering to an XAML SwapChainPanel
Loading and compiling resources asynchronously

What You Will Learn

  • Set up a Direct3D application and perform real-time 3D rendering with C# and SharpDX
  • Learn techniques for debugging your Direct3D application
  • Render a 3D environment with lights, shapes, and materials
  • Explore character animation using bones and vertex skinning
  • Create additional surface detail using tessellation with displacement mapping and displacement decals
  • Implement image post-processing tasks within compute shaders
  • Use real-time deferred rendering techniques to implement improved shading for lighting and shadows
  • Learn to Program the graphics pipeline with shaders using HLSL implemented by Shader Model 5

Authors

Table of Contents

Chapter 1: Getting Started with Direct3D
Introduction
Introducing Direct3D 11.1 and 11.2
Building a Direct3D 11 application with C# and SharpDX
Initializing a Direct3D 11.1/11.2 device and swap chain
Debugging your Direct3D application
Chapter 2: Rendering with Direct3D
Introduction
Using the sample rendering framework
Creating device-dependent resources
Creating size-dependent resources
Creating a Direct3D renderer class
Rendering primitives
Applying multisample anti-aliasing
Implementing texture sampling
Chapter 3: Rendering Meshes
Introduction
Rendering a cube and sphere
Preparing the vertex and constant buffers for materials and lighting
Adding material and lighting
Using a right-handed coordinate system
Loading a static mesh from a file
Chapter 4: Animating Meshes with Vertex Skinning
Introduction
Preparing the vertex shader and buffers for vertex skinning
Loading bones in the mesh renderer
Animating bones
Chapter 5: Applying Hardware Tessellation
Introduction
Preparing the vertex shader and buffers for tessellation
Tessellating a triangle and quad
Tessellating bicubic Bezier surfaces
Refining meshes with Phong tessellation
Optimizing tessellation through back-face culling and dynamic Level-of-Detail
Chapter 6: Adding Surface Detail with Normal and Displacement Mapping
Introduction
Referencing multiple textures in a material
Adding surface detail with normal mapping
Adding surface detail with displacement mapping
Implementing displacement decals
Optimizing tessellation based on displacement decal (displacement adaptive tessellation)
Chapter 7: Performing Image Processing Techniques
Introduction
Running a compute shader – desaturation (grayscale)
Adjusting the contrast and brightness
Implementing box blur using separable convolution filters
Implementing a Gaussian blur filter
Detecting edges with the Sobel edge-detection filter
Calculating an image's luminance histogram
Chapter 8: Incorporating Physics and Simulations
Introduction
Using a physics engine
Simulating ocean waves
Rendering particles
Chapter 9: Rendering on Multiple Threads and Deferred Contexts
Introduction
Benchmarking multithreaded rendering
Implementing multithreaded dynamic cubic environment mapping
Implementing dual paraboloid environment mapping
Chapter 10: Implementing Deferred Rendering
Introduction
Filling the G-Buffer
Implementing a screen-aligned quad renderer
Reading the G-Buffer
Adding multiple lights
Incorporating multisample anti-aliasing
Chapter 11: Integrating Direct3D with XAML and Windows 8.1
Introduction
Preparing the swap chain for a Windows Store app
Rendering to a CoreWindow
Rendering to an XAML SwapChainPanel
Loading and compiling resources asynchronously

Book Details

ISBN 139781849697101
Paperback430 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

HLSL Development Cookbook Book Cover
HLSL Development Cookbook
$ 29.99
$ 21.00
Unity Shaders and Effects Cookbook Book Cover
Unity Shaders and Effects Cookbook
$ 29.99
$ 6.00
DirectX 11.1 Game Programming Book Cover
DirectX 11.1 Game Programming
$ 23.99
$ 16.80
OpenGL Development Cookbook Book Cover
OpenGL Development Cookbook
$ 29.99
$ 21.00
OpenGL 4 Shading Language Cookbook, Second Edition Book Cover
OpenGL 4 Shading Language Cookbook, Second Edition
$ 32.99
$ 23.10
Unity 4.x Cookbook Book Cover
Unity 4.x Cookbook
$ 29.99
$ 21.00