Part II: Direct3D Foundations

Chapter List

Chapter 4: Direct3D Initialization Chapter 5: The Rendering Pipeline Chapter 6: Lighting Chapter 7: Texturing Chapter 8: Blending Chapter 9: Stenciling Chapter 10: The Geometry Shader

Part Overview

In this part, we study fundamental Direct3D concepts and techniques that are used throughout the rest of this book. With these fundamentals mastered, we can move on to writing more interesting applications. A brief description of the chapters in this part follows.

Chapter 4, “Direct3D Initialization

In this chapter, we learn what Direct3D is about and how to initialize it in preparation for 3D drawing. Basic Direct3D topics are also introduced, such as surfaces, pixel formats, page flipping, depth buffering, and multisampling. We also learn how to measure time with the performance counter, which we use to compute the frames rendered per second. In addition, we show how to output 2D text and give some tips on debugging Direct3D applications. We develop and use our own application framework — not the SDK’s framework.

Chapter 5, “The Rendering Pipeline

In this long chapter, we provide a thorough introduction to the rendering pipeline, which is the sequence of steps necessary to generate a 2D image of the world based on what the virtual camera sees. We learn how to define 3D worlds, control the virtual camera, and draw 3D scenes.

Chapter 6, “Lighting

This chapter shows how to create light sources and define the interaction between light and surfaces via materials. In particular, we show how to implement directional lights, point lights, and spotlights with vertex and pixel shaders.

Chapter 7, “Texturing

This chapter describes texture mapping, which is a technique used to increase the realism of the scene by mapping 2D image data onto a 3D primitive. For example, using texture mapping, we can model a brick wall by applying a 2D brick wall image onto a 3D rectangle. Other key texturing topics covered include texture tiling and animated texture transformations.

Chapter 8, “Blending

In this chapter, we look at a technique called blending, which allows us to implement a number of special effects like transparency. In addition, we discuss the intrinsic clip function, which enables us to mask out certain parts of an image; this can be used to implement fences and gates, for example. We also show how to implement a fog effect.

Chapter 9, “Stenciling

This chapter describes the stencil buffer, which, like a stencil, allows us to block pixels from being drawn. To illustrate the ideas of this chapter, we include a thorough discussion on implementing planar reflections using the stencil buffer. An exercise describes an algorithm for using the stencil buffer to render the depth complexity of a scene and asks you to implement the algorithm.

Chapter 10, “The Geometry Shader

This chapter shows how to program geometry shaders, which are special because they can create or destroy entire geometric primitives. Some applications include billboards, subdivisions, and particle systems. In addition, this chapter explains primitive IDs and texture arrays.

转载于:https://www.cnblogs.com/seanyou/archive/2010/09/20/1831435.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值