HLSL Development Cookbook
eBook - ePub

HLSL Development Cookbook

  1. 224 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

HLSL Development Cookbook

About this book

In Detail

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.

Approach

Written in an engaging yet practical manner, HLSL Development Cookbook allows you to pick the recipes you need as and when they are required.

Who this book is for

If you have some basic Direct3D knowledge and want to give your work some additional visual impact by utilizing advanced rendering techniques, then this book is for you. It is also ideal for those seeking to make the transition from DirectX 9 to DirectX 11, and those who want to implement powerful shaders with the High Level Shader Language (HLSL).

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

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
Cover Image by Artie Ng ()

Credits

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

About the Author

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.

About the Reviewers

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...

Table of contents

  1. HLSL Development Cookbook

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access HLSL Development Cookbook by Doron Feinstein in PDF and/or ePUB format, as well as other popular books in Informatica & Informatica generale. We have over one million books available in our catalogue for you to explore.