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
Arrow up icon
GO TO TOP
HLSL Development Cookbook

You're reading from   HLSL Development Cookbook Implement stunning 3D rendering techniques using the power of HLSL and DirectX 11

Arrow left icon
Product type Paperback
Published in Jun 2013
Publisher Packt
ISBN-13 9781849694209
Length 224 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Doron Feinstein Doron Feinstein
Author Profile Icon Doron Feinstein
Doron Feinstein
Arrow right icon
View More author details
Toc

PCF with varying penumbra size


Now that we covered the basics of shadow casting with the different light sources, we can extend the fixed penumbra PCF implementation to support varying penumbra size.

We will be using a technique called percentage-closer soft shadows (PCSS). The technique will be presented through the spot light, but it can be used with point light sources. Although you can get this technique to work with directional shadows, it won't make much sense. This will be further explained in the How it works... section.

Getting ready

For this recipe, we will be using the exact same setup we had in the spot light shadow recipe. Note that we will need to take more samples from the shadow map in order to generate the wider penumbra areas, so it is recommended to use a larger shadow map than you would use with the fixed penumbra shadows.

If you may recall, the introduction to this chapter mentioned that the light source size affects the penumbra size. However, none of our light sources...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image