O'Reilly logo

HLSL Development Cookbook by Doron Feinstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Point light PCF shadows

Casting shadows from a point light used to be difficult compared to spot lights before the days of DirectX 10. Similar to spot light shadow map, the point light shadow map has to cover the entire area affected by the light. Cube-map textures seem like a natural candidate for this task, but they could not be used properly with DirectX 9 due to two problems.

Tip

Cube maps can be thought of as six 2D textures, one texture for each face of the cube. Cube maps are great for representing information around a center point, which in this recipe, is the point light's center.

The first problem was memory. A point light with the same range as a spot light will need six times the amount of memory to cast shadows of the same quality due ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required