![]()
HLSL Development Cookbook
Table of Contents
HLSL Development Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Forward Lighting
Introduction
Hemispheric ambient light
Getting ready
How to do it...
How it works...
Directional light
Getting ready
How to do it...
How it worksā¦
There's moreā¦
Point light
Getting ready
How to do it...
How it worksā¦
Spot light
Getting ready
How to do it...
How it worksā¦
Capsule light
Getting ready
How to do it...
How it worksā¦
Projected texture ā point light
Getting ready
How to do it...
How it worksā¦
Projected texture ā spot light
Getting ready
How to do it...
How it worksā¦
Multiple light types in a single pass
Getting ready
How to do it...
How it worksā¦
There's moreā¦
2. Deferred Shading
Introduction
GBuffer generation
Getting ready
How to do it...
How it works...
There's more...
GBuffer unpacking
Getting ready
How to do it...
How it worksā¦
Directional light
Getting readyā¦
How to do it...
How it worksā¦
Point light
Getting ready
How to do it...
How it worksā¦
Capsule light
Getting readyā¦
How to do it...
How it worksā¦
Spot light
Getting ready
How to do it...
How it worksā¦
3. Shadow Mapping
Introduction
Spot light PCF shadows
Getting ready
How to do it...
How it works...
There's more...
Point light PCF shadows
Getting ready
How to do it...
How it works...
There's moreā¦
Cascaded shadow maps
Getting ready
How to do it...
How it worksā¦
PCF with varying penumbra size
Getting ready
How to do it...
How it worksā¦
There's moreā¦
Visualizing shadow maps
Getting ready
How to do it...
How it worksā¦
4. Postprocessing
Introduction
HDR rendering
Getting ready
How to do it...
How it works...
There's moreā¦
Adaptation
Getting ready
How to do it...
How it worksā¦
There's moreā¦
Bloom
Getting ready
How to do it...
How it worksā¦
Distance depth of field
Getting readyā¦
How to do it...
How it worksā¦
Bokeh
Getting ready
How to do it...
How it worksā¦
5. Screen Space Effects
Introduction
Screen space ambient occlusion
Getting ready
How to do it...
How it worksā¦
Lens flare
Getting ready
How to do it...
How it worksā¦
There is moreā¦
Screen space reflections
Getting ready
How to do it...
How it worksā¦
Screen space Sun rays
Getting ready
How to do it...
How it worksā¦
6. Environment Effects
Introduction
Dynamic decals
Getting ready
How to do it...
How it worksā¦
There's moreā¦
Distance/Height-based fog
Getting ready
How to do it...
How it worksā¦
Rain
Getting ready
How to do it...
How it worksā¦
Index
![]()
HLSL Development Cookbook
Copyright Ā© 2013 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: June 2013
Production Reference: 1060613
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84969-420-9
www.packtpub.com
![]()
Author
Doron Feinstein
Reviewers
Brecht Kets
Pope Kim
Acquisition Editor
Erol Staveley
Lead Technical Editors
Arun Nadar
Hardik Saiyya
Technical Editor
Kaustubh S. Mayekar
Project Coordinator
Arshad Sopariwala
Proofreader
Mario Cecere
Indexer
Tejal R. Soni
Graphics
Ronak Dhruv
Abhinash Sahu
Valentina D'silva
Production Coordinator
Shantanu Zagade
Cover Work
Shantanu Zagade
![]()
Doron Feinstein has been working as a graphics programmer over the past decade in various industries. Since he graduated his first degree in software engineering, he began his career working on various 3D simulation applications for military and medical use. Looking to fulfill his childhood dream, he moved to Scotland for his first job in the game industry at Realtime Worlds. Currently working at Rockstar Games as a Senior Graphics Programmer, he gets to work on the companyās latest titles for Xbox 360, PS3, and PC.
![]()
Brecht Kets is a Senior Lecturer at Howest University in Belgium, where he teaches game development in one of the leading international game development study programs, Digital Arts, and Entertainment (www.digitalartsandentertainment.com). Heās been actively involved in game development for several years, and has been writing about XNA since the launch in December 2006. He hosts the www.3dgameprogramming.net website and has received the Microsoft Most Valuable Professional award in the category DirectX/XNA six times in a row for his contributions in the community.
He has also co-authored the book Building your First Mobile Game using XNA 4.0, Packt Publishing and the video series XNA 3D Game Development By Example, Packt Publishing.
Pope Kim is a seasoned rendering programmer with over 10 years of experience in the gaming industry. While working with top game studios in the world, he has shipped over a dozen games on many platforms, including Xbox 360, PS3, PC, Wii, PS2, and PSP.
He has degrees in Law and Computer Science, and is an occasional presenter at computer graphics or game-related conferences, such as Siggraph and Korea Game Conference.
He is also a part-time educator. He served his 3 years at the Art Institute of Vancouver as an HLSL programming instructor and currently holds a professor position at Sogang University Game Education Center.
In 2012, he authored an introductory HLSL programming book, which instantly became a best-seller in Korea. It is currently being translated back to English and is partly available on his blog.
You can follow Pope at http://www.popekim...