1.15k likes | 1.17k Views
Learn about a novel technique to reduce aliasing in virtual proteins using Aliasing PCF, with detailed PCF filtering methods at 40% and nearest settings. Explore efficient PCF bilinear interpolation and lerp functions to enhance shadows.
E N D
Efficient PCF shadowmap filtering Kees van Kooten Virtual Proteins
PCF 40%
PCF nearest
PCF nearest 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 1 1 1 1 1 0 0 0 0 0 0 0
PCF bilinear 0.56 0.19 0.19 0.06
PCF bilinear 0.56 0.75 0.19 0.19 0.38 0.06
PCF bilinear 0.56 0.75 0.75 0.19 0.19 0.38 0.38 0.06
PCF bilinear 0.56 0.75 0.75 0.75 0.75 0.19 0.75 1 1 1 1 0.25 0.75 1 1 1 1 0.25 0.75 1 1 1 1 0.25 0.75 1 1 1 1 0.25 0.19 0.25 0.25 0.25 0.25 0.06
PCF bilinear
0.56 0.19 0.56 0.19 0.56 0.19 0.19 0.06 0.19 0.06 0.19 0.06 0.56 0.19 0.56 0.19 0.56 0.19 0.19 0.06 0.19 0.06 0.19 0.06 0.56 0.75 0.75 0.75 0.75 0.19 0.56 0.19 0.56 0.19 0.56 0.19 0.75 1 1 1 1 0.25 0.19 0.06 0.19 0.06 0.19 0.06 0.75 1 1 1 1 0.25 0.75 1 1 1 1 0.25 0.75 1 1 1 1 0.25 0.19 0.25 0.25 0.25 0.25 0.06
PCF efficient bilinear
0.75 1 1 1 1 0.25
a b c d e f F1 F2 F3 F4 F5 F6 S = aF1 + bF2 + cF3 + dF4 + eF5 + fF6
aF1 + bF2 lerp(F1,F2,o)
aF1 + bF2 lerp(F1,F2,o) s∙lerp(F1,F2,o)
(a+b) s = b o = s aF1+bF2 = s∙lerp(F1,F2,o)
F1 0 F2
aF1 0 bF2
aF1+bF2 0
aF1+bF2 0 lerp(F1,F2,o)
aF1+bF2 0 s∙lerp(F1,F2,o)
aF1+bF2 0 s∙(1-o)F1+ s∙oF2
s = a+b 0
b o = a+b 0
d b f a+b c+d e+f a b c d e f F1 F2 F3 F4 F5 F6 s = (a+b)lerp(F1,F2, ) + (c+d)lerp(F1,F2, ) + (e+f)lerp(F1,F2, )
aF1 bF2 cF3 dF4 PCF in 2D
s1∙lerp(F1,F2,o1) aF1 bF2 cF3 dF4 s2∙lerp(F3,F4,o2)
s1∙G1 aF1 bF2 cF3 dF4 s2∙lerp(F3,F4,o2)
s1∙G1 aF1 bF2 cF3 dF4 s2∙G2
s2 (s1+s2)lerp(G1,G2, ) s1+s2 = s∙lerp( G1, G2, y) s∙lerp(lerp(F1,F2,x), lerp(F3,F4,x), y)
s2 (s1+s2)lerp(G1,G2, ) s1+s2 = s∙lerp(s1∙lerp(F1,F2,o1), s2∙lerp(F3,F4,o2), y) = s∙lerp(lerp(F1,F2,x), lerp(F3,F4,x), y)
Doomed? 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1