A Deeper Look at PCF | 深入了解 PCF
Therefore, PCF is not filtering the shadow map then compare
PCF 不是先模糊 ShadowMapping 再做比较
And PCF is not filtering the resulting image with binary visibilities
PCF 不是模糊结果图像来做抗锯齿
Revisiting PCSS | 重温 PCSS
The Complete algorithm of PCSS | PCSS 的完整算法
- Step 1: Blocker search (getting the average blocker depth
in a certain region
) | 步骤 1:屏蔽搜索(找出某一区域的平均深度) - Step 2: Penumbra estimation (use the average blocker depth to determine filter size) | 步骤 2:半影估计(使用平均遮挡深度来确定过滤器大小)
- Step 3: Percentage Closer Filtering | 步骤 3:百分比更紧密过滤
- Step 1: Blocker search (getting the average blocker depth
Which step(s) can be slow | 哪些步骤会比较慢
- Looking at every texel inside a region (steps 1 and 3)
- Softer -> larger filtering region -> slower
Variance Soft Shadow Mapping | 方差软阴影
Fast blocker search (step 1) and filtering (step 3) [Yang et al.]
Let's think form "percentage closer" filtering
- The percentage of texels that are in front of the shading point, i.e
Variance
- So you just need the mean of (depth²)
- 一张额外的深度图, 值是深度的平方(用额外的一个通道即可)
It doesn't have to be too accurate!
- Chebychev's inequality (one -tailed version, for t > mu)
μ: mean
σ²: variance
Doesn't even assume Gaussian distribution!