[gpu pro]shadow map for omnidirectinal light using tetrahedron mapping
这个文章很cool。
result
顾名思义(btw,tetrahedron意思是四面体),是讲的点光源阴影,直接看和传统omnidirectional shadow map对比的数据吧:
cubemap:230fpsdual-paraboloid:276fpstetrahedron with stencil:418fps对rendertarget的要求:![[gpu pro]shadow 地图 for omnidirectinal light using tetrahedron 地图ping](http://img.reader8.net/uploadfile/jiaocheng/201401101/2954/2014012903542352462.jpg)
但是这里需要注意两点:rendertarget上面tetrahedron需求是最小的但是render scene上面比较多,技术本身的限制,重复render的几率比较大,所以上面帧数的差别也要打一些折扣。techcubemap shadowmap使用6个面来包点光源,顾名思义,tetrahedron是使用4个面来包点光源。![[gpu pro]shadow 地图 for omnidirectinal light using tetrahedron 地图ping](http://img.reader8.net/uploadfile/jiaocheng/201401101/2954/2014012903542352463.jpg)
rendertarget的组织方式太棒了:![[gpu pro]shadow 地图 for omnidirectinal light using tetrahedron 地图ping](http://img.reader8.net/uploadfile/jiaocheng/201401101/2954/2014012903542352464.jpg)
在render红色这个plane方向上的object的时候,就写到rendertarget红色这个区域,并使用stencil来避掉不该写的部分。frustum的构建是我觉得可能让其数据掺水的地方,![[gpu pro]shadow 地图 for omnidirectinal light using tetrahedron 地图ping](http://img.reader8.net/uploadfile/jiaocheng/201401101/2954/2014012903542352465.jpg)
还是正常的frustum在各个方向上,但是可以看出一个quad的frustum,只取其中的一部分。其他的构建和sample就比较顺理成章了,非常有灵性的算法。