I always wanted to make a soft shadow. I had a fancy to the variance shadow map for a long time, but I never realized it. I learned very well about probability theory and cannot quite understand it. However, cherbihov's inequality is still relatively simple, the basic idea is that we can use expectation and variance to obtain the upper limit of the probability of a certain distribution interval. shadowmap is the maximum probability that we can obtain the range of the current depth value in the shadowmap, this is actually similar to PCF, for the expectation and variance method, you can look at the http://www.cnblogs.com/lookof/archive/2010/03/21/1690769.html, this eldest brother wrote very good, we can open the hardware texture filter, but due to limited sampling, so the de-distribution is limited for linear, which is a two-pixel range. Of course, we can use Gaussian to perform fuzzy processing to enable anti-aliasing, which can also be used to hide the Sawtooth, gaussian's usage notes: I simply multiply the weight by a factor of 2, which makes it impossible to implement it all the time. Then I overwrite it, but it's okay. Of course, there is also the problem of Light blend, or recommended here http://www.cnblogs.com/lookof/archive/2010/03/21/1690769.html