基于百分比渐近滤波(PCF)算法,提出一种改进的实时阴影反走样算法——数据修正PCF算法,其主要思想是在双线性插值滤波前对插值的数据进行必要的修正,从而消除阴影中的一些锯齿形走样现象.该算法利用像素渲染器PS2.0在图形硬件上实现.从实例图片可以看出,文中算法产生的许多阴影边界走样现象得到了明显的改善.
An improved shadow anti-aliasing method based on percentage closer filtering (PCF) and named as data shift PCF is presented to generate real-time shadows in computer graphics. The primary idea is to make sawtooth shadow edges straight by data shift before bilinear interpolation in PCF. The algorithm is implemented with graphic hardware using Pixel Shader 2.0, several examples show that most of aliasing artifacts have been removed compared with PCF alone.