Book Image

HLSL Development Cookbook

By : Doron Feinstein
Book Image

HLSL Development Cookbook

By: Doron Feinstein

Overview of this book

3D graphics are becoming increasingly more realistic and sophisticated as the power of modern hardware improves. The High Level Shader Language (HLSL) allows you to harness the power of shaders within DirectX 11, so that you can push the boundaries of 3D rendering like never before.HLSL Development Cookbook will provide you with a series of essential recipes to help you make the most out of different rendering techniques used within games and simulations using the DirectX 11 API.This book is specifically designed to help build your understanding via practical example. This essential Cookbook has coverage ranging from industry-standard lighting techniques to more specialist post-processing implementations such as bloom and tone mapping. Explained in a clear yet concise manner, each recipe is also accompanied by superb examples with full documentation so that you can harness the power of HLSL for your own individual requirements.
Table of Contents (13 chapters)

Introduction


Lighting and postprocessing are two of the most important fields in 3D rendering. A scene that is properly lit with the right postprocessing effects can produce beautiful results, but not every element you may want to render can be represented by a mesh you can load from file. One common scenario where a mesh loaded from a file cannot be used is when the mesh has to be dynamically generated at runtime based on some unpredictable event, like a mesh that represents damage to the scene. Another good example is when rendering an element which is too complex to be represented by triangles, like smoke and fire.

In this chapter, we will focus on techniques which implement those various scene elements, which we can't represent with a loaded mesh. The recipes presented in this chapter can be split into three main categories:

  • Dynamic mesh generation: It is used in cases where the mesh shape can't be predicted beforehand, but once the mesh is prepared it no longer changes

  • Depth-based rendering...