@[TOC](08Shading 1 (illumination,Shading and Graphics Pipeline))
一、Shading 2(Shading,Pipeline and Texture Mapping)
高光:观察方向和镜面反射方向接近。半程向量是一种优化,简化计算
Ambient Term
Shading that does not depend on anything
- Add constant color to account for disregarded illumination and fill in black shadows
Flat shading - Triangle face is flat one normal vector
- Not good forsmooth surfaces
Gouraud shading
- lnterpolate colors from vertices across triangle
- Each vertex has a normal vector (how?)
Phong shading
- lnterpolate normalvectors across each triangle
- Compute full shading model at each pixel
- Not the Blinn-Phong Reflectance Model
Defining Per-Vertex Normal Vectors
Barycentric interpolation (introducing soon)of vertex normals
Graphics (Real-time Rendering) Pipeline实时渲染管线
Snail Shader Program
lnigo Quilez, https://youtu.be/XuSnLbB1j6E
Texture Mapping
Surfaces are 2D
Surface lives in 3D world space
Every 3D surface point also has a place where it goes in the 2D image (texture).
均为(0,1)
纹理的无缝衔接,贴图