基于图形硬件的辐照度环境纹理图的计算方法
摘 要
辐照度环境纹理图是绘制任意光照环境下漫反射物体表面的一种有效的方法。为了实现动态光照环境下辐照度环境纹理图的实时绘制,基于当前的通用图形硬件,提出了一种采用顶点着色器快速计算辐照度环境纹理图的方法。该方法从分析球面调和函数入手,首先得出环境贴图的二次多项式表达形式;然后用顶点着色程序对多项式系数和球面调和函数进行加速计算,以快速生成辐照度环境纹理图;最后对于动态光照环境,则通过对环境纹理图的分级细化来加快光照系数的计算,进而实现了动态光照环境下辐照度环境纹理图的重新绘制。实验表明,在动态光照条件下,采用该方法在获取真实感光照效果的同时,其运算速度也能满足交互系统的需求。
关键词
A Technique to Evaluate Irradiance Environment Maps
() Abstract
Irradiance environmental maps are an effective technique to render diffuse objects in arbitrary lighting environments. Based on current computer graphics hardware a technique is proposed for calculating irradiance environmental maps using vertex shader. The approach starts from an analysis of spherical harmonics and finds out a quadratic polynomial form of environment mapping. Using vertex shader instructions the polynomial coefficients and spherical harmonics functions can be fast calculated, and then the corresponding irradiance environment maps are also generated. When the lighting environment changes, the lighting coefficients are fast computed by generating a mipmap of the source environment map, so that real time recalculating irradiance environment is obtained. The experimental result shows it not only renders realistic lighting but also satisfies the interactive requirements in dynamic lighting environments.
Keywords
|