ShaderX2: Introductions and Tutorials with DirectX 9.0
ra ShaderX2: Introductions and Tutorials with DirectX 9.0
ShaderX2: Introductions & Tutorials with DirectX 9 is a collection of articles that provide an introduction to vertex and pixel shader programming using DirectX 9. Nearly a dozen experts in the graphics programming and software engineering fields share their knowledge on a variety of shader programming subjects, including how to integrate shaders written in the High Level Shading Language into your application and how to create shader-friendly 3D models. Other topics discussed are implementing shadow maps and shadow volumes to create realistic-looking shadow effects, using advanced lighting models, adding fog effects to increase a scene’s realism, and unlocking the new features of the pixel and vertex shader 3.0 models. Additionally, facilitating the shader prototyping process using a new shader development tool is addressed.
Real-Time Rendering Tricks and Techniques in DirectX
Real-Time Rendering Tricks and Techniques in DirectX(Premier Press Game Development)
There are many books that describe the theory behind rendering techniques without walking the reader through actual source code. There are also samples available on the internet that supply source code without explaining how and why the code works. There are very few resources available that walk the reader all the way from the theory to the implementation details. Real Time Rendering Tricks and Techniques in DirectX bridges that gap by presenting over 25 rendering techniques using the latest version of DirectX. The book begins with basic concepts like matrices, vertices, and textures before moving to advanced topics such as vertex and pixel shaders.
Most of the rendering techniques are based on vertex and pixel shaders.
Included are three different techniques for generating shadows, reflection and refraction, Bezier surfaces, matrix palette skinning, bump mapping, image processing, and much more. There are also several techniques which are not based on shaders. There are chapters that cover using the stencil buffer, video textures with DirectShow, picking, timing, 2D drawing, and drawing text efficiently. Each chapter presents the theory behind the technique before walking the reader through the shader and application code that makes each technique possible. Each chapter ends with a short discussion of performance considerations, limitations, and ideas for improvements. After studying a given technique, the reader will understand what the technique is, why it works, and how it works.
The CD includes several tools, as well as all of the application code, shader code, and media needed to implement the techniques. It also includes sample applications and technology papers from nVidia and ATI. As readers understand each technique, they can go to these third party resources to see how other people have approached similar problems. The book and CD give the reader a well rounded view of these exciting rendering tricks and techniques. Download: http://rapidshare.com/files/273126189/Real..._in_DirectX.rar<!--Session data-->
Real-Time Rendering 2nd Edition
Real-Time Rendering 2nd Edition
One would think that the title of Tomas Moller's and Eric Haines's book, Real-Time Rendering, would be a contradiction in terms. How can such a computationally intensive process as rendering computer graphics ever hope to be done on the fly, in the blink of an eye, without delay--in short, in real time?
The term rendering, as it applies to computer graphics, refers to the mathematically intensive process of creating a picture or sequence of frames based on geometry. The duration of this process is dependent on the complexity of the scene (a forest with many trees and thousands of leaves will take much longer to render than a scene consisting of a white box over a gray background) and the speed of the hardware doing the calculations.
When Pixar's Toy Story was first released, the computer animation community was all abuzz with how it was done, and someone at Pixar mentioned that over 100 SGI workstations were used for rendering the frames over the course of almost two years. Someone else extrapolated this data and figured out that the same movie could have been rendered on one contemporary PC over the course of about 80 years.
The authors deftly answer the question, not only asserting that it can be done, but since this book is a programmer's guide, they list snippets of programming algorithms that help outline how it can be done.
Because the software and hardware is constantly and rapidly evolving due to the insatiable need for more realistic and complex graphics, the book avoids getting too specific. To quote the authors, "The field is rapidly evolving, and so it is a moving target." This lack of specificity doesn't detract from the usefulness of the book, though. Instead, it works at a higher, more abstract level, describing approaches to rendering techniques using generic algorithms. It is up to the programmer to apply these methods to the specific program or system on which it is to be implemented.
In "Real-Time Shader Programming", Ron Fosner describes the essential elements necessary for developing shaders in a very approachable full color book that spans just over 400 pages. The book includes a CD with a beta version ATI's RenderMonkey and coded examples of many of the shaders discussed in the text.
Shaders are a relatively new option in the rendering pipeline. By taking explicit control over how vertices and pixels are processed by the graphics hardware, a virtually unlimited number of special effects are available to the programmer. Generally, custom lighting, coloring, or texture mapping are used to create a unique look for an application.
Beginning with elementary vector math, the book moves quickly into lighting theory. The lighting chapter highlights the mathematical approximation of physically based lighting using the traditional ambient, specular, diffuse, and emissive colors in a scene. Representations for reflection and refraction are derived from Snell's Law, and Fresnel equations. Finally, non-photo realistic rendering (from cel shading, tonal art maps, and hatching) is covered through pictures and a wealth of external references. The chapter makes for an enjoyable read by providing an understandable background to lighting techniques to non-seasoned graphics programmers.
Fosner describes how to set up the DirectX pipeline to use shaders. While he touches on some of the nuances you're likely to encounter, the DirectX section seemed a bit sparse compared to the earlier chapters. The DirectX setup calls specific to shaders were well documented, however the chapter didn't dwell on creating the pipeline.
In the subsequent chapter, Fosner discusses several current shader creation and visualization tools. The chapter is relatively short in length perhaps due in part to the volatility and newness of cutting edge shader tools. While high level shader tools, like Nvidia's Cg or Microsoft's High Level Shader Language were briefly mentioned, the book instead focused on the shader language primitives. As such, it provided a sound fundamental shader approach that is universal to all higher-level shader implementations.
Having the groundwork firmly in place, Fosner provides a wealth of shader examples. Starting with the minimal vertex shader, additional functionality is layered to build more complex shaders. Sample shaders are developed using the lighting equations presented earlier. While it may take a little time to digest some of the more sophisticated examples, like the cartoon shader, the text provides adequate descriptive detail coupled with helpful color pictures to make it easier.
The final chapter provides a vertex and pixel command reference. Each command describes the supported shader version, usage, and a short example. The book covers shader implementations for both DirectX 8.x and DirectX 9. Differences between the two versions are noted throughout the sample code and reference section. When appropriate, additional notes on specific DirectX versions are also provided. Fosner does a good job of providing references throughout the book for further information on a subject.
While having familiarity with the rendering pipeline, I found this book very approachable and easy to understand despite not being a low-level graphics programmer. The writing and companion tools provided challenged me to explore the world of shaders and attempt to write some of my own. The tools were a great aid, since it alleviated me from having to write my own engine, and instead focus on the actual shader code. Writing in pseudo-assembly may not seem like fun, but it was - especially when you could experiment with one of the pre-coded routines Fosner supplied and view the results of a vertex or pixel shader routine through RenderMonkey instantly.
Shaders will play an increasingly important role in game development as they allow immense visual flexibility with which to create a unique appearance. Fosner's book presents the introductory groundwork necessary for developing custom shaders. For programmers who are new to shaders or want to experiment with different rendering effects, this book is a great place to start.
"Shaders for Game Programmers and Artists"—the title says it all. This book does something that other shader books don’t. It focuses solely on shaders and their creation. You’ll use ATI’s RenderMonkey platform, giving you an easy-to-use framework for shader development and allowing you to focus your energy on shader development rather than the development of framework applications. Cover simple techniques, from the basics of color filters to more advanced topics, such as depth of field, heat shimmer, and high-dynamic range rendering. Extensive excercises at the end of each chapter allow you to test your skills by expanding upon the shader you’ve just developed. Whether you are an engineer or a technically minded artist, you’ve finally found the ideal guide for mastering shaders!
Physics is a hot topic in computer games. No self-respecting action game can get by without a good physics engine, and the trend is rapidly spreading to other genres, including strategy games and puzzles. This growth has been largely fuelled by middleware companies offering high-powered physics simulation.Many high-profile games feature commercial physics engines.
But commercial packages come at a high price, and for a huge range of developers building a custom physics solution can be cheaper, provide more control, and be more flexible. Unfortunately physics is a topic shrouded in mystery, mathematics, and horror stories.
When I came to build a general physics engine in 2000, I found there was almost no good information available, almost no code to work from, and lots of contradictory information. I struggled through and built a commercial engine, and learned a huge amount in the process. Over the last five years I’ve applied my own engine and other commercial physics systems to a range of real games. More than five years of effort and experience are contained in this book.
There are other books, websites, and articles on game physics, but there is still almost no reliable information on building a physics engine—that is, a complete simulation technology that can be used in game after game. This book aims to step you through the creation of a physics engine. It goes through a sample physics engine (provided on the CD) line by line, as well as giving you insight into the design decisions that were made in its construction. You can use the engine as is, use it as a base for further experimentation, or make different design decisions and create your own system under the guidance that this book provides.