Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
HLSL Development Cookbook
HLSL Development Cookbook

HLSL Development Cookbook: Implement stunning 3D rendering techniques using the power of HLSL and DirectX 11

eBook
€8.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

HLSL Development Cookbook

Chapter 2. Deferred Shading

In this chapter we will cover:

  • GBuffer generation

  • GBuffer unpacking

  • Directional light

  • Point light

  • Capsule light

  • Spot light

Introduction


In the previous chapter, we mentioned that forward lighting has performance limitations. If you recall the basic algorithm for forward lighting, we potentially need to draw every mesh once for each light source. For a scene with N light sources and M meshes, we may need N times M draw calls. This means that every additional mesh is going to add up to N new draw calls and each new light source will add up to M new draw calls. Those numbers add up very quickly and pose a major limitation on the amount of elements you can render in an interactive frame rate.

Over the years, as graphic cards' memory size increased and GPUs commonly supported rendering to multiple render targets (MRT), a couple of solutions to the performance problems were developed. At their core, all the solutions work on the same principle – separate the scene rendering from the lighting. This means that when using those new methods, a scene with M meshes and N light sources is going to only take M + N draw calls...

GBuffer generation


Unlike forward lighting, where we just started rendering the scene with the lights, deferred shading requires the GBuffer to be generated before any light related calculation can take place.

Choosing the structure of the GBuffer is a very important decision. The bare minimum you can get away with is storing depth, base color, normal, specular power, and specular intensity. For this configuration, you will need between three to four render targets.

Storing depth and base color is straight forward. Use a D24S8 render target for the depth and stencil. For base color we will be using an A8R8G8B8 render target as the base color values are usually sampled from 8 bit per-pixel texture. The alpha channel of the color target can be used to store the specular intensity. Storing normals on the other hand is not that simple and requires some planning. To keep this section relatively short, we are only going to cover three storage methods that have been used in popular AAA games.

Tip

Note...

GBuffer unpacking


Before any light related work can be accomplished, all the data stored in the GBuffer has to be unpacked back into a format that we can use with the lighting code presented in the forward lighting recipes.

You may have noticed one thing missing from our GBuffer and that is the world space position needed for lighting. Although we could store per-pixel world positions in our GBuffer, those positions are implicitly stored already in the depth buffer as non-linear depth. Together with the projection parameters, we are going to reconstruct the linear depth of each pixel (world distance from the camera) as part of the GBuffer unpacking process. The linear depth will later be used together with the inversed view matrix to reconstruct the world position of each pixel.

Getting ready

While unpacking the GBuffer, you always want to use point sampling when fetching data from the GBuffer texture views. You will need to set one point sampler and the four shader resource views for the pixel...

Directional light


Now that we know how to decode the GBuffer, we can use it to calculate directional lighting. Unlike forward rendering, where we rendered the scene in order to trigger the pixel shader and do the light calculations, the whole point using a deferred approach is to avoid rendering the scene while doing the lighting. In order to trigger the pixel shader we will be rendering a mesh with a volume that encapsulates the GBuffer pixels affected by the light source. Directional light affects all the pixels in the scene, so we can render a full screen quad to trigger the pixel shader for every pixel in the GBuffer.

Getting ready…

Back in the old days of Direct3D 9 you would need to prepare a vertex buffer to render a full screen quad. Fortunately, this is a thing of the past. With DirectX11 (as well as DirectX10) it is very easy to render a full screen quad with null buffers and sort out the values in the vertex shader. You will still need a constant buffer to store the same light information...

Point light


Compared to the directional light, point lights may only cover parts of the screen. In addition, it may be partially or fully occluded by the scene as viewed when generating the GBuffer. Fortunately, all we need to represent the light source volume is to render the front of a sphere located at the point light's center position and scale to its range.

Representing the light source as its volume makes sense when you think about the portion of the scene encapsulated by this volume. In the point lights case, the portion of the scene that gets lit is going to be inside this sphere volume. Rendering the volume will trigger the pixel shader for all pixels that are inside the volume, but could also trigger the pixel shader for pixels that are in front or behind the volume. Those pixels that are outside the volume will either get culled by the depth test or get fully attenuated so they won't affect the final image.

In the DirectX9 days you would normally use a pre-loaded mesh to represent...

Capsule light


Capsule light volume is made of a sphere divided into two and extruded along the capsules segment to form the cylindrical part of the capsule. As with the point light volume, we will use the tessellator to generate the capsule volume, only this time we will expend two control points instead of one. Each one of these points will eventually get turned into a half sphere attached to half of the capsules cylindrical part. The two capsule halves will connect at the center of the capsule.

Getting ready…

Our capsule will be scaled by two values, a range and a segment length. Those are the exact same values we used for the forward capsule light. Unfortunately, we can't use a matrix to scale the capsule because we need to scale the segment and the range separately. Therefore, we will set the capsule lights range, segment length, and a transformation to projected space to the Domain shader. The matrix will combine the capsule rotation and translation with the view and projection matrix...

Spot light


Spot light volume is represented by a cone with a rounded base. We can use same technique used for generating the capsule light half capsule volume and shape the result as the spot lights cone. As this requires only half of the capsule, we will only need to draw a single vertex.

Getting ready

As with the point and capsule lights, we will need all the GBuffer related values along with the pixel shader constants we used for the light properties in the forward spot light recipe.

Unlike the capsule light volume, the spot light volume can be scaled by a matrix, so we won't need to pass any scaling parameters to the Domain shader. The following illustration shows how the pretransform cone will look like:

We can use the following formula to calculate the matrix X and Y scale value:

Where α is the cone's outer angle LightRange is the spot light's range. For the Z component we just use the light range value.

The light cone tip will be at coordinate origin, so the rotation and translation parts...

Left arrow icon Right arrow icon

Key benefits

  • Discover powerful rendering techniques utilizing HLSL and DirectX 11
  • Augment the visual impact of your projects whilst taking full advantage of the latest GPUs
  • Experience the practical side of 3D rendering with a comprehensive set of excellent demonstrations

Description

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.

Who is this book 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).

What you will learn

  • Learn about different light sources in both forward and deferred implementations
  • Take your dynamic lighting to the next level with shadow map support
  • Discover a range of post processing effects like bloom and tone mapping
  • Implement 3D elements such as decals, rain, and more
  • Harness various screen space techniques that help augment the visual quality of your work
Estimated delivery fee Deliver to Portugal

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 13, 2013
Length: 224 pages
Edition : 1st
Language : English
ISBN-13 : 9781849694209
Tools :

What do you get with Print?

Product feature icon Instant access to your digital eBook copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to Portugal

Premium delivery 7 - 10 business days

€17.95
(Includes tracking information)

Product Details

Publication date : Jun 13, 2013
Length: 224 pages
Edition : 1st
Language : English
ISBN-13 : 9781849694209
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 116.97
HLSL Development Cookbook
€41.99
GLSL Essentials
€28.99
Direct3D Rendering Cookbook
€45.99
Total 116.97 Stars icon
Banner background image

Table of Contents

6 Chapters
Forward Lighting Chevron down icon Chevron up icon
Deferred Shading Chevron down icon Chevron up icon
Shadow Mapping Chevron down icon Chevron up icon
Postprocessing Chevron down icon Chevron up icon
Screen Space Effects Chevron down icon Chevron up icon
Environment Effects Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.8
(14 Ratings)
5 star 35.7%
4 star 28.6%
3 star 21.4%
2 star 7.1%
1 star 7.1%
Filter icon Filter
Top Reviews

Filter reviews by




The Saint Aug 18, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
HLSL Development Cookbook In the early 1990's I was responsible for leading the effort to create the DirectX API's and Direct3D at Microsoft. As we all know the technology was tremendously successful and widely adopted, as an unfortunate consequence of that success I was promoted and condemned to many years in management. 18 years later, I finally have the time and opportunity to get back to programming and I find myself in the embarrassing position of having to re-learn the technology I helped to pioneer after many generations of advancement since I last worked with it personally. I've been reading a lot of technical books lately to re-acquaint myself with the modern Direct3D API and I found this book REALLY helpful. Since the 1990's 3D game engine design has evolved tremendously and become an incredibly sophisticated business. I'm very fortunate to have a great foundation to build on but I'm constantly amazed at how advanced and complex the technology has become since my early days in the field. I do not envy the difficulties that new engineers to the field face when trying to master such amazingly sophisticated technology for the first time starting from scratch.I've read several great introductory books on DirectX 11 programming and some great books that explain the overall architecture of the modern Direct3D API's but I found myself frequently bewildered by how all of these powerful features and API's are used in concert to build complete modern game engines until I ran across the HLSL Development Cookbook. This book really put it all together for me in a practical way. I already know C/C++, I already know how to program in Windows and I'm already familiar with DirectX architecture and API's. I just needed to understand how an advanced 3D game engine is constructed using these tools which, this book did a fantastic job of. It is very clearly and concisely written by somebody who obviously had years of experience in the area and understood all of the nuances and shortcomings of various approaches to 3D that have led them to a clear and focused understanding of how to balance graphic realism with performance and coding productivity.The first thing I do when I buy these books is install the sample code and see if it builds and works, because if the sample code doesn't work then the book is often useless to me. I usually end up spending more time and learn more from working with code samples than reading the actual text. In this case, the sample code installed and built correctly on my machine immediately in all build modes using Visual Studio 2010 which it was authored for. When I subsequently opened the samples in Visual Studio 2012 they migrated flawlessly. The samples are great, they are a complete logical progression of all of the fundamental "recipes" one needs to build a reasonably advanced modern 3D game engine. The text does a great job of walking the reader through the examples and explaining WHY they were written that way, which is what I found that I needed most. Here's an example of a paragraph from the book that did wonders to shed light on why a particular problem was solved a certain way in Direct3D when it might seem that there are many reasonable approaches that SHOULD work."Rendering the bokeh highlights uses an interesting feature introduced in DirectX10 which lets us issue a Draw call without knowing how many vertices or primitives we want to draw. DirectX10 lets us issue this kind of Draw call for a vertex buffer that got streamed out and DirectX11 added support for buffers which we use in this recipe. This allows us to issue a Draw call with an amount of primitives equal to the amount of highlights we added to the buffer."Clearly the Direct3D API had evolved a lot over the years to cope with progressively more advanced demands and new hardware capabilities. Somebody NEW to the API may not understand the need for certain features without a context provided by a seasoned Direct3D veteran who had first-hand experience with why the API had evolved a certain way. It helped a lot.This book is not an introduction to DirectX, Windows programming or C/C++, it assumes that the reader already knows or is familiar with that stuff. It gets straight down to showing you exactly how it's done. The samples are high quality and did a great job of helping me put it all together. It was a great addition to my library.
Amazon Verified review Amazon
Chang L. Aug 01, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
HLSL Development Cookbook is for professional game developers in advanced shader programming. Beginning game developers can also learn the basic physics in shader from the book. Developers can apply the techniques and codes described in the book to their real games.To design a HLSL shader, a developer needs to understand math, physics, and HLSL syntax, type, as well as function. To understand a HLSL algorithm in physics, a developer needs to understand the light and its effects.This book was well organized. Author paid attention for readers to understand the "know-how" of HLSL shader. One of the most helpful section of the book is "How it works ...", in which the physics and algorithms of HLSL shader were described. To better understand HLSL codes, readers can read this section first, then read section "How to do it ...".Chapter 1 to 3 are about pre-processing. Chapter 4 and 5 are about post-processing. Chapter 6 is about environment processing. Chapters of pre-processing are focused on lighting from basic forward lighting to shadows.In addition to the introduction of ambient, directional, point, spot, and capsule light, the first chapter also introduced projected texture for point and spot light. That is a technique to represent complex light sources by intensity/color patterns. Similar to per-pixel lighting technique, texture lighting may generate wonderful unrealistic lighting effects. HLSL shaders are powerful expression of these effects.Deferred Shading introduced in Chapter 2 is an optimized method for computing of multiple light sources and objects. This Chapter introduced GBuffer method developed in DirectX 11. Hull, Domain, and Geometry shaders in DirectX 11 are also explained in Chapter 2.By adding attenuation in Blinn-Phong light model, shadow mapping technique was introduced in Chapter 3. Author discussed PCF, a shadow-casting technique that is based on projected textures in Chapter 1.Postprocessing is an interesting topic in Chapter 4. HDR, Bloom, DOF and Bokeh have been discussed. One of the most interested solution of HDR is to apply 16-bit float format for image channel and tone mapping by compute shader. The detail discussion of downscale in DirectX 11 is very helpful for HDR programming with HLSL shader. HDR technique has been widely used in modern game programming and will be helpful for new generation console - XBOX One - programming.Chapter 5 discussed screen space ambient, occlusion, sun rays, reflections, and lens flare. An interesting topic is to simulate the lens flare of camera lens that shows a series of colorful shapes around the scene. Movie makers have applied lens flare to generate artistic effects.Chapter 6 discussed dynamic mesh generation, particle system, and depth-based rendering. Particle system can be used to simulate fire and rain. UAV (Unordered Access View) buffer of DirectX 11 was used for buffer read and write in rain simulation.Sample codes of the book are easy to compile and build under Visual Studio 2010/2012 for Windows Desktop. Developers can understand the C++ codes of DirectX 11 and HLSL codes from these samples.
Amazon Verified review Amazon
John Mabbott Sep 17, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Given the value that this book provides at the price, I think many DX11 developers should consider it a must-buy. Doron has leveraged his experience working on titles such as GTA V and Max Payne 3 to publish a comprehensive set of lighting, shadowing and post-processing effects that can give your game a professional look.I am most of the way through incorporating the recipes from the book into my engine, and now have robust forward and deferred rendering paths, complete with shadowing and some effects. I would say that I wouldn't have got here without the firm foundation provided by Frank Luna's excellent DX11 book, but I'd say that Doron's work have elevated the look of my game from reasonable to something that looks passably good.There are a few others things to mention that drove my rating of 5 stars:1) All source compiled first time without errors on the latest free MS compiler (Visual Studio Express 2013 for Desktop)2) Pre-compiled binaries were included with the source distribution to allow for samples to be run immediately.3) I emailed the author a question about soft shadows for omnidirectional point lights and got a very prompt and helpful answer that pointed me in the right direction.4) The author makes full use of the latest capabilities of DX11 - hull, domain and compute shaders are expertly applied to take advantage of the latest hardware capability that DX11 exposes.As for cons, I noted that the other reviews mention spelling and grammatical errors in the book. There are a number of these, however this did not detract from my ability to determine the author's intent at all, in other words it was obvious what was trying to be communicated where these mistakes were made. This certainly wasn't enough in my mind to drop the rating by a star, and the value provided by the techniques exhibited is so high.
Amazon Verified review Amazon
Michael Schuld Sep 16, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The book tends to be pretty source heavy (HLSL source that is) with very little C++ or DirectX code being shown, so it is definitely recommended to at least have a basic grasp of setting up a simple DirectX 11 application works before tackling the content. On the bright side though, all of the HLSL source is explained in great detail including many diagrams to help get across more of the complicated concepts that aren't necessarily obvious just from reading the code itself. One thing I really got from these descriptions and diagrams was a good explanation of how the half angle optimization for Blinn Specular works. I always knew how to write the code for this technique but never really understood the real reasoning behind why it works until now. Each "recipe" builds on top of the last one, so going through the whole chapter one sample at a time is a great way to build your knowledge of all the standard lighting types and shaders normally used.Once you have a firm grasp of the different shading models and techniques for each light type, Chapter 2 will take you into the much more complicated but also more high performance world of Deferred Shading. Using the new Hull and Domain shader functionality provided by DirectX 11, much of the hard work of optimizing the steps of Deferred Shading are easily handled. All of the complexities of basic Hull and Domain shaders are explained while developing the model, and each light type from the first chapter is then implemented in a single flexible shader that can eventually handle multiple lights (up to 4) in a single rendering pass.After Deferred Shading, the much more advanced and complex techniques of shadow maps, post processing, screen space effects like ambient occlusion and "god rays", and environmental effects like fog and decals are discussed in depth. There is too much content to go in to in a simple review, so why don't you go pick up a copy and see for yourself how great the recipes in this title are and how much you can learn from it! I know I'll be using the techniques in future development.
Amazon Verified review Amazon
Patrik Van Ostaeyen Feb 05, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Great to-the-point book.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela