当前位置: 代码迷 >> 综合 >> GAMES101-08Shading2 (着色,管线,纹理渲染)
  详细解决方案

GAMES101-08Shading2 (着色,管线,纹理渲染)

热度:56   发布时间:2024-01-05 10:32:52.0

@[TOC](08Shading 1 (illumination,Shading and Graphics Pipeline))


一、Shading 2(Shading,Pipeline and Texture Mapping)

高光:观察方向和镜面反射方向接近。半程向量是一种优化,简化计算

p
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)

纹理的无缝衔接,贴图