Possible Implementation of Deep Shadow Map in OpenGL

Before reading this post, I assume the reader already know the implementation of traditional shadow map in OpenGL:

Pixar movie Brave use deep shadow map approach to render hair shadow (as well as its self-shadow):

Pixar’s movie Brave

Possible Implementation in OpenGL:

Use 3D texture as shadow map depth texture. 
The reason to use 3D texture is because in deep shadow map, the depth texture in a specific pixel of the shadow camera view image, is not only contain depth information but also contain a visibility value in different depth level. So for example when doing a texture look up in the depth texture, you should provide the x, y and the z value to it, so that it could return a visibility value:
v = f(x, y, z)

Depth Peeling Method:
Using depth-peeling algorithm, we don’t have the issue that how large the scene it is. For example, if there are only two objects, say spheres, in the scene. One place close to the camera, and the other place really far away. If we use 3D texture to capture all of the scene, we need to know the furthest object to define how large the texture should be. With depth peeling algorithm however, the numbers of depth level doesn’t care how far the object it is. The trade off is wee need to know how many objects in the scene for depth peeling method. Also, depth peeling may not be able to eliminate objects while testing specific depth level to evaluate the visibility value.

Deep Shadow Map paper here

Deep Shadow Map

Leave a Reply

Your email address will not be published. Required fields are marked *