Real-Time -3D-Rendering-with-DirectX-and-HLSL

所需积分/C币:38 2017-11-14 11:30:55 16.12MB PDF
收藏 收藏 2

Graphics programming is the magic behind video games, film, and scientific simulation. Every explosion, dust particle, and lens flare you see on a computer screen is processed through a graphics card. In addition, because modern operating systems use the graphics processing unit (GPU) to draw their
Introduction Graphics programming is the magic behind video games, film, and scientific simulation. Every explosion, dust particle, and lens flare you see on a computer screen is processed through a graphics card. In addition, because modern operating systems use the graphics processing unit (GPu to draw their content, every pixel you see is rendered through the GPU and through software developed by a graphics programmer. It's a broad topic, but one that has traditionally been the province of a select few. Even to experienced software developers, rendering is often considered a dark art, full of complex mathematics and esoteric tools. Furthermore the rapid pace of advancement makes modern graphics programming a moving target, and establishing a foothold can be difficult That's where this book comes in. In these pages, you'll find an introduction to real-time 3d rendering. I've presented this material in a straightforward and practical way but it doesn't shy away from more complex topics. Indeed, this book takes you far beyond drawing simple objects to the screen and introduces intermediate and advanced subjects in modern rendering. It is my sincere wish that you find the material in this book approachable, applicable, and up-to-date with modern graphics techniques Intended Audience This book is intended for experienced software engineers new to graphics programming. The text often uses terminology from the video game industry but you need not be a game developer to make use of this book Indeed, the topic of modern rendering reaches well beyond video games and is becoming ever more pervasive in a variety of software-related fields. Regardless of the specific type of software you develop if you are interested in learning about modern rendering this book is for you This text also assists existing graphics programmers who are new to directX or who are familiar with an older version of the library. We cover Directx, and the library has seen major changes over the last few years. this book also applies to students, hobbyists and technical artists interested in real-time rendering If you are new to programming, not specifically graphics programming, this book might not be what you're looking for. In particular, Part Ill,"Rendering with DirectX ,develops a C++ rendering engine and expects a familiarity with that language Why This Book? Several excellent books on the market explore graphics programming. However, most of these texts focus on only one area: either shader programming or the rendering api (such as directx or openGL). mention of the other topic, the other side of the same coin, is often given short shrift--perhaps just a chapter or two Modern rendering doesnt exist without shaders, but shaders aren't executed without an underlying graphics application I know of few books that incorporate both topics in a thorough integrated fashion nor one that balances introductory material with intermediate and advanced topics. a sticking point with many books is that they are either so novice that they leave the reader wanting or so advanced that even experienced software engineers have trouble absorbing the material You can also find a number of good books on general-purpose game or engine programming. These texts often include material on graphics programming or approaches to organizing 3D models and materials. But these books often have such a broad scope that rendering gets lost in the pages The approaches I've mentioned are all valid, and again, you can find many wonderful books on the market Yet I'm seeing a gap where an experienced developer who wants to tackle graphics programming is missing a text that offers a full, focused treatment of rendering from both the CPU and GPu sides of the topic. This book aims to fill this gap How This Book Is Organized This book is organized into four parts a Part I,An Introduction to 3D Rendering, provides an introduction to graphics programming. It ncludes a discussion about the history of DirectX up to version 11. 1(the version were using in this book and looks at the direct3d graphics pipeline. Chapter 2 includes a primer on 3D math, along with a detailed look at the DirectX Math API. If you are already familiar with linear algebra and 3d mathematics, you might consider skipping or skimming Chapter 2. However, I encourage you to read the section on DirectX Math (Microsoft's latest revision of an impressive SIMD-friendly math library focused on graphics-related mathematics). Part I ends with an exploration of best-of-breed tools for authoring and debugging shaders and graphics applications a Part II,Shader Authoring with HLSL, is all about shaders and programming using the High-Level Shader Language(HLSL). This section begins with the most introductory vertex and pixel shaders and a discussion of semantics and annotations. Chapter 5 examines texture mapping and texture filtering and rapping modes. Chapter 6 introduces basic lighting models, including ambient lighting, diffuse(Lambert) lighting, and specular highlighting. Chapter 7 details point lights, spot lights and multiple lights. In Chapter 8, you write shaders involving cube maps, including shaders for skyboxes and environment mapping. Part Il concludes with a potpourri of shaders for fog, color blending, normal mapping and displacement mapping In Part III, Rendering with Directx, we discuss the application side of the house. Throughout this section, you develop a C++ rendering engine and incorporate the shaders you authored in Part II. Chapters 10-14 introduce the core components of the engine: the game loop, time, components and Windows and DirectX initialization We also cover mouse and keyboard input cameras, and text rendering. In Chapter 15 you dive into the topic of 3D models: asset loading and model rendering. And in Chapter 16, you develop a flexible effect and material system to integrate your shaders. Part III ends with a chapter on CPU-side structures for directional, point and spot lights a Part IV,Intermediate-Level Rendering Topics, raises the bar a bit and moves to intermediate-level rendering topics. the section begins with a discussion of post-processing techniques (effects ty pically applied to the entire scene after its initial rendering). this includes shaders for color filtering, gaussian blurring bloom and distortion mapping. In Chapter 19, you implement systems for projective texture mapping and shadow mapping. Then in Chapter 20, you develop a skeletal animation system for importing and rendering animated models. Chapter 21 details geometry and tessellation shaders; you implement a point sprite shader and explore hardware tessellation a powerful addition to the directx 11 graphics pipeline. The book ends with a survey of additional topics in modern rendering including rendering optimization deferred rendering global illumination, compute shaders and data-driven engine architecture Prerequisites This book has no expectation that you are already a game or graphics developer, nor does it expect you to be fluent in 3D mathematics. It simply requires you to be interested in graphics programming and already be familiar with the C++ programming language. If you are an experienced programmer but you are coming from a different language you may have no trouble with the material in Parts Ill and Iv. However there is no concerted effort to discuss C++ syntax. Furthermore, all code samples are provided for the microsoft Windows operating system and are packaged for Visual Studio 2012 or 2013. these samples require a graphics card that supports(at least) shader Model 4. Some of the samples (particularly the demonstrations on compute shaders and tessellation require a graphics card that supports Shader Model 5 Companion Website Thisbookhasacompanionwebsiteat errata, along with a forum for questions and discussion about the book. Conventions in This Book This book uses a number of conventions for source code, notes and warnings Note When something needs additional explanation it is called out in a note"that looks like this Warning: Warnings Look Like This A warning" points out something that might not be obvious and could cause problems if you did not know about it When code appears inside the text, it looks like this You will also find exercises at the end of chapters 3-22 (all but the first two chapters. These exercises reinforce the material discussed in the text and encourage you to experiment Part I: An Introduction to 3D Rendering 1 Introducing DirectX 2 A 3D/ Math Primer 3 Tools of the trade

试读 127P Real-Time -3D-Rendering-with-DirectX-and-HLSL
立即下载 低至0.43元/次 身份认证VIP会员低至7折
nishuolaizui 是完整版,清晰度还行
  • GitHub

关注 私信 TA的资源
Real-Time -3D-Rendering-with-DirectX-and-HLSL 38积分/C币 立即下载
Real-Time -3D-Rendering-with-DirectX-and-HLSL第1页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第2页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第3页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第4页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第5页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第6页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第7页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第8页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第9页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第10页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第11页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第12页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第13页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第14页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第15页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第16页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第17页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第18页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第19页
Real-Time -3D-Rendering-with-DirectX-and-HLSL第20页

试读结束, 可继续阅读

38积分/C币 立即下载 >