参考 Spherical Harmonic Lighting, the Gritty Details, by Robin Green. http://www.research.scea.com/gdc2003/spherical-harmonic-lighting.html  文档,  实现了使用SH渲染由D3DXCreateBox和D3DXCreateTorus建造的模型的阴影效果.




(注) 在代码中文件 "sphere.mesh"和 "torus.mesh"  存储的数据是分别由 D3DXCreateSphere(m_pd3dDevice, 1.0f, 32, 16, pObject->m_pMesh, NULL),D3DXCreateTorus(m_pd3dDevice,1.0f, 16, 32, pObject->m_pMesh, NULL) 函数生成后导出的.

程序代码和采样数据: /Files/vibilin/SHProject.rar