目录索引
译文
“光照模型”指的是模型表面与光源之间相互作用的结果。根据该定义,光照模型包括了光源属性(如颜色、强度等)和指定的材料属性。
在着色器中,我们可以逐像素或逐顶点地计算光照。逐顶点计算时,这种计算照明的方式被称为逐顶点光照,在顶点着色器中进行计算。逐像素计算时,这种计算照明的方式被称为逐像素光照,在片元着色器中进行计算。
在本书开头的第 1.1.2 小节中,我们介绍了渲染路径的定义和功能。渲染路径与我们接下来要学习的内容有着千丝万缕的联系,它与一系列与物体光照和阴影相关的操作相对应。我们还介绍了两种渲染路径(前向渲染和延迟渲染)。在第七章中,我们将在着色器中使用基本光照模型,为此我们将讨论环境光、漫反射和镜面反射。
原文对照
A lighting model refers to the result of the interaction between an object surface and the light source. By definition, it includes the light source properties (e.g. color, intensity, etc.), and the assigned material properties.
In a shader, illumination can be calculated per-vertex or per-pixel. When calculated by vertex, it is called per-vertex lighting and the operation is performed in the vertex shader stage, when it is calculated by pixel, it is called per-fragment lighting and is performed within the fragment shader stage.
In the previous chapter, section 1.1.2, we conceptually defined the function of a rendering path, which corresponds to a series of operations related to the lighting and shading of objects. We also illustrated two types of rendering, forward rendering and deferred shading. In this section we will recreate a shader using a basic lighting model, for this we will talk about ambient color, diffuse reflection, and specular reflection.
暂无评论内容