Direct3D9的学习历程二:Direct3D9中的灯光

来源:互联网 发布:知乎live的图标 编辑:程序博客网 时间:2024/04/28 23:44

Direct3D supports three light source models: directional lights,point lights, and spot lights. Light sources emit three types of light:ambient light, diffuse light, and specular light.

Direct3D支持三种光源模型:方向光源,点光源,聚光灯光源。这些光源可以发射出三种光:环境光,漫反射光,镜面反射光。

The material of a surface defines how light interacts with the sur-face that it strikes (that is, how much light is reflected andabsorbed, thus determining the color of the surface).

一个表面的材质被定义为当一束光穿过这个表面时会产生什么样的效果。(多少光被反射和多少光被吸收是取决于该表面的颜色)

Vertex normals are used to define the orientation of a vertex. They are used so that Direct3D can determine the angle at which a ray of light strikes the vertex. In some cases, the vertex normal is equal to the normal of the triangle that it forms, but this is not usually the case when approximating smooth surfaces (e.g., spheres,cylinders).

顶点法向量常常被定义为一个顶点的方向。Direct3D使用它们来决定一束光穿过顶点的角度。在某些情况下,顶点法向量就等于它所构成的三角形面的法向量,但是在曲面上这种情况并不是常常一致的。(如球体,圈体)

原创粉丝点击