首页> 外国专利> Method and apparatus for performing tangent space lighting and bump mapping in a deferred shading graphics processor

Method and apparatus for performing tangent space lighting and bump mapping in a deferred shading graphics processor

机译:在延迟阴影图形处理器中执行切线空间照明和凹凸贴图的方法和设备

摘要

A system and method for performing tangent space lighting in a deferred shading graphics processor (DSGP) encompasses blocks of the DSGP that preprocess data and a Phong shader that executes only after all fragments have been preprocessed. A preprocessor block receives texture maps specified in a variety of formats and converts those texture maps to a common format for use by the Phong shader. The preprocessor blocks provide the Phong shader with interpolated surface basis vectors (vs, vt, n), a vector Tb that represents in tangen/object space the texture/bump data from the texture maps, light data, material data, eye coordinates and other information used by the Phong shader to perform the lighting and bump mapping computations. The data from the preprocessor is provided for each fragment for which lighting effects need to be computed. The Phong shader computes the color of a fragment using the information provided by the preprocessor. The Phong shader performs all lighting computations in eye space, which requires it first to transform bump data from tangent space to eye space. In one embodiment the Phong hardware does this by multiplying a matrix M whose columns comprise eye space basis vectors (bs, bt, n) derived from the surface basis vectors (vs, vt, n) and the vector Tb of bump map data. The eye space basis vectors are derived by the DSGP preprocessor so that the multiplication (MTb) gives the perturbed surface normal N in eye space, reflecting the bump effects. The perturbed surface normal N is subsequently used in the lighting computations.
机译:一种用于在延迟阴影图形处理器(DSGP)中执行切线空间照明的系统和方法,包括预处理数据的DSGP块和仅在对所有片段进行预处理后才执行的Phong着色器。预处理器块接收以多种格式指定的纹理贴图,并将这些纹理贴图转换为通用格式,以供Phong着色器使用。预处理器块为Phong着色器提供内插的表面基础向量(v s ,v t ,n),该向量Tb在tangen /对象空间中表示纹理/凹凸来自纹理贴图的数据,灯光数据,材质数据,眼睛坐标以及Phong着色器用于执行照明和凹凸贴图计算的其他信息。为需要计算照明效果的每个片段提供了来自预处理器的数据。 Phong着色器使用预处理器提供的信息来计算片段的颜色。 Phong着色器在眼空间中执行所有照明计算,这要求它首先将凹凸数据从切线空间转换为眼空间。在一个实施例中,Phong硬件通过乘以矩阵M来做到这一点,该矩阵M的列包括从表面基础向量(b s ,b t ,n)的眼空间基础向量(b v s ,v t ,n)和凹凸贴图数据的矢量Tb。眼空间基向量是由DSGP预处理程序导出的,因此乘法(MTb)给出了眼空间中受扰动的表面法线N,反映了凹凸效果。扰动的表面法线N随后用于照明计算中。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号