Please enable Javascript to view the contents

·  ☕ 26 分钟

## 1. 渲染着色的物理原理

### 1.1. 光的物理本质

$$\pmb J=\sigma \pmb E$$

\begin{aligned} \nabla \cdot\pmb E &= \frac{1}{\varepsilon}\pmb \rho\\\\ \nabla\cdot\pmb B&=0\\\\ \nabla\times \pmb E&=-\frac{\partial \pmb B}{\partial t}\\\\ \nabla\times \pmb B&=\mu\sigma\pmb E+ \mu_0\varepsilon_0\frac{\partial \pmb E}{\partial t} \end{aligned}

$$\nabla\cdot\pmb J=-\frac{\partial \rho}{\partial t}$$

$$\frac{\partial \rho}{\partial t}=-\sigma(\nabla\cdot\pmb E)=-\frac{\sigma}{\varepsilon}\rho$$

$$\rho(t)=\rho(0)e^{-(\sigma/\varepsilon)t}$$

• 对于理想导体，$\sigma =\infty$，$\tau=0$
• 对于良导体，$\tau$比电磁波的角周期小得多：$\tau\ll1/\omega$
• 对于不良导体，则$\tau$比电磁波的角周期大得多：$\tau\gg 1/\omega$

\begin{align} \nabla\times(\nabla\times \pmb E)&=\nabla(\nabla\cdot\pmb E)-\nabla^2\pmb E=\nabla\times(-\frac{\partial \pmb B}{\partial t})\\\\ &=-\frac{\partial}{\partial t}(\nabla\times\pmb B)=-\mu\sigma\frac{\partial \pmb E}{\partial t}-\mu_0\varepsilon_0\frac{\partial^2\pmb E}{\partial t^2}\\\\ \nabla\times(\nabla\times \pmb B)&=\nabla(\nabla\cdot\pmb B)-\nabla^2\pmb B=\nabla\times(\mu\sigma\pmb E+\mu_0\varepsilon_0\frac{\partial \pmb E}{\partial t})\\\\ &=\mu\sigma(\nabla\times\pmb E) +\mu_0\varepsilon_0\frac{\partial}{\partial t}(\nabla\times\pmb E)=-\mu\sigma\frac{\partial B}{\partial t}-\mu_0\varepsilon_0\frac{\partial^2\pmb B}{\partial t^2} \end{align}

\begin{align} &\begin{matrix} \nabla \cdot \pmb E=0&\nabla\cdot \pmb B=0 \end{matrix}\\\\ \Rightarrow\ \ \ & \begin{matrix} \nabla^2\pmb E=\mu\sigma\dfrac{\partial \pmb E}{\partial t}+\mu_0\varepsilon_0\dfrac{\partial^2\pmb E}{\partial t^2} \\\ \nabla^2\pmb B=\mu\sigma\dfrac{\partial B}{\partial t}+\mu_0\varepsilon_0\dfrac{\partial^2\pmb B}{\partial t^2} \end{matrix} \end{align}

\begin{aligned} \tilde {\pmb E}(z,t)=\tilde{\pmb E}_0e^{i(\tilde k z-\omega t)}\\\\ \tilde {\pmb B}(z,t)=\tilde{\pmb B}_0e^{i(\tilde k z-\omega t)} \end{aligned}

$$\tilde k^2=\mu\varepsilon\omega^2+i\mu\sigma\omega$$

$$\tilde k=k+i\kappa$$

\begin{align} k&\equiv \omega\sqrt{\frac{\mu\varepsilon}{2}}\left[\sqrt{1+\left(\frac{\sigma}{\varepsilon\omega}\right)^2}+1 \right]^{1/2}\\\\ \kappa&\equiv \omega\sqrt{\frac{\mu\varepsilon}{2}}\left[\sqrt{1+\left(\frac{\sigma}{\varepsilon\omega}\right)^2}-1 \right]^{1/2} \end{align}

\begin{aligned} \tilde {\pmb E}(z,t)=\tilde{\pmb E}_0e^{-\kappa z} e^{i(k z-\omega t)}\\\\ \tilde {\pmb B}(z,t)=\tilde{\pmb E}_0e^{-\kappa z} e^{i(k z-\omega t)} \end{aligned}

• $\tilde k$的虚部导致波的衰减，振幅随着$z$的增大而减小，度量了波进入导体的深度，也度量了导体阻尼对波能量的吸收（吸收系数$\alpha\equiv 2\kappa$）
• $\tilde k$的实部定义了波的属性，如波长$\lambda = \frac{2\pi}{k}$，波速$v=\frac{\omega}{k}$，折射率$n=\frac{ck}{\omega}$

• 散射：决定介质的浑浊程度（下图右）
• 吸收：决定材质的外观颜色（下图左）

### 1.2. 渲染中的光学模型

#### 1.2.1. 光与物体表面的交互

• 镜面反射：光线在两种介质交界处发生直接反射，满足反射定律
• 折射：从表面进入介质的光由于介质折射率的变化，传播方向发生改变，出现折射现象，介质中的光将发生吸收和散射
• 吸收：由前推导，当介质中的吸收系数$\alpha>0$时，在光传播过程中部分能量将会被介质所吸收
• 散射：光的传播方向由于折射率的剧烈变化发生改变，分裂为多个方向，但光的总能量保持不变
• 次表面散射：观察像素小于散射距离
• 透射：入射光进入介质后又穿过该介质出射
• 漫反射：观察像素大于散射距离

#### 1.2.2. 不同物质与光的交互

• 金属：金属的外观取决于材质表面的镜面反射，且入射金属的光不存在散射，会被自由粒子完全吸收
• 非金属：非金属又称电介质，非金属外观取决于吸收和散射特性：
• 均匀介质：主要为透明介质，无折射率变化，光总以直线传播，不存在散射，但存在吸收
• 非均匀介质：通常可建模为具有嵌入散射粒子的均匀介质，具有折射率的变化
• 浑浊介质：具有弱散射
• 半透明介质：具有强散射
• 不透明介质：与半透明介质类似，具有强散射

## 2. 光线传输基础

### 2.1. 反射方程

$$L_o(\pmb p,\pmb \omega_o)=L_e(\pmb p,\pmb \omega_o)+\int_\Omega f_r(\pmb p,\pmb \omega_i\rightarrow\pmb \omega_o)L_i(\pmb p,\pmb \omega_i)\cdot(\pmb \omega_i\cdot\pmb n)\cdot\mathrm d\pmb \omega_i$$

$$L_o(\pmb p,\pmb \omega_o)=\int_\Omega f_r(\pmb p,\pmb \omega_i\rightarrow\pmb \omega_o)L_i(\pmb p,\pmb \omega_i)\cdot(\pmb \omega_i\cdot\pmb n)\cdot\mathrm d\pmb \omega_i$$

### 2.2. BRDF

#### 2.2.1. 辐射度量学的基本概念

BRDF是定义在辐射度量学上的，简单介绍相关概念：

$$Q=hv$$

$$c=\lambda v$$

$$Q=\frac{hc}{\lambda}$$

$$\Phi=\frac{\mathrm dQ}{\mathrm dt}$$

$$I=\frac{\mathrm d\Phi}{\mathrm d\Omega}$$

$$E=\frac{\mathrm d\Phi}{\mathrm d A}$$

$$E_e=\frac{\Phi}{4\pi r^2}$$

$$L=\frac{\mathrm d^2\Phi}{\mathrm d\Omega\mathrm dA^\perp}=\frac{\mathrm d^2\Phi}{\mathrm d\Omega\mathrm dA\cos\theta}$$

#### 2.2.2. 双向反射分布函数

$$E(\pmb p)=\int_\Omega L_i(\pmb p,\pmb \omega_i)\cos\theta_i\mathrm d\pmb \omega_i$$

$$\mathrm dE(\pmb p,\pmb \omega_i)=L_i(\pmb p,\pmb \omega_i)\cos\theta_i\mathrm d\pmb \omega_i$$

$$\mathrm dL_o(\pmb p,\pmb \omega_o)\propto\mathrm d E(\pmb p,\pmb \omega_i)$$

$$f_r(\pmb p, \pmb \omega_o,\pmb \omega_i)=\frac{\mathrm dL_o(\pmb p,\pmb \omega_o)}{\mathrm d E(\pmb p,\pmb \omega_i)}=\frac{\mathrm dL_o(\pmb p,\pmb \omega_o)}{L_i(\pmb p,\pmb \omega_i)\cos\theta_i\mathrm d\pmb \omega_i}$$

$$L_o(\pmb p,\pmb \omega_o,\pmb \omega_i)=\int_\Omega f_r(\pmb p, \pmb \omega_o,\pmb \omega_i)L_i(\pmb p,\pmb \omega_i)\cos\theta_i\mathrm d\pmb \omega_i$$
BRDF的性质：

1. 交换律：$f_r(\pmb p,\pmb \omega_o,\pmb \omega_i)=f_r(\pmb p,\pmb \omega_i,\pmb \omega_o)$
2. 能量守恒：$\int_\Omega f_r(\pmb p,\pmb \omega_o,\pmb \omega_i)\cos\theta\mathrm d\omega\leq 1$

#### 2.2.3. Cook-Torrance BRDF

$$f_r=k_d\cdot f_{\mathrm{diffuse}} +k_s\cdot f_{\mathrm{specular}}$$

## 3. Lambertian漫反射材质模型

Lambertian漫反射模型假定出射光线在各个方向上都是均匀的（强度相等），由反射方程：
\begin{aligned} L_o(\pmb\omega_o)&=\int_\Omega f_rL_i(\pmb\omega_i)\cos\theta_i\mathrm d\pmb \omega_i\\\\ &=f_rL_i\int_\Omega \cos\theta_i\mathrm d\pmb \omega_i\\\\ &=\pi f_rL_i \end{aligned}

$$f_r=\frac{\rho}{\pi}$$

## 4. 镜面反射模型

### 4.2. 法线分布函数（Normal Distribution Function）

$$\int_{\pmb m\in\Theta}D(\pmb m)(\pmb n\cdot\pmb m)\mathrm d{\pmb m}=1$$

$$\int_{\pmb m\in\Theta}D(\pmb m)(\pmb v\cdot\pmb m)\mathrm d{\pmb m}=\pmb v\cdot\pmb n$$

$$D(\pmb m)=\delta(\pmb m-\pmb n)$$

$$\int_{m\in\Theta}G_1(\pmb m, \pmb v)D(\pmb m)(\pmb v\cdot\pmb m)^+\mathrm d\pmb m=\pmb v\cdot \pmb m$$

#### 4.2.1. 法线分布函数的基本性质

1. 非负性
$$0\leq D(\pmb m)\leq \infty$$

2. 法线分布函数的积分表征了微表面的面积，显然微表面面积应大于等于宏观表面面积
$$\int_{\pmb m\in \Theta}D(\pmb m)\mathrm d\pmb m\geq 1$$

3. 微表面和宏观表面在垂直于任何视图方向$\pmb v$的平面上的投影总是相等的
$$\int_{\pmb m\in\Theta}D(\pmb m)(\pmb v\cdot\pmb m)\mathrm d{\pmb m}=\pmb v\cdot\pmb n$$

4. 特别地，当视图法向沿着宏观法向时，积分归一化
$$\int_{\pmb m\in\Theta}D(\pmb m)(\pmb n\cdot\pmb m)\mathrm d{\pmb m}=1$$

#### 4.2.2. 法线分布函数的形状不变性

Heitz定义各向同性的法线分布函数具有形状不变性即材质粗糙度的影响等价于微表面的拉伸，具有形状不变性的微表面法线分布函数可以表示为以下形式：
$$D(\pmb m)=\frac{\chi^+(\pmb n\cdot\pmb m)}{\alpha^2(\pmb n\cdot\pmb m)^4}g\left(\frac{\sqrt{1-(\pmb n\cdot\pmb m)^2}}{\alpha(\pmb n\cdot\pmb m)}\right)$$

#### 4.2.3. 常用的法线分布函数

Blinn-Phong分布

Blinn-Phong分布函数具有如下形式：
$$D(\pmb m)=\frac{\alpha_p+2}{2\pi}(\pmb n\cdot\pmb m)^{\alpha_p}$$

$$D(\pmb m)=\frac{1}{\pi\alpha^2}(\pmb n\cdot\pmb m)^{(\frac{2}{\alpha^2}-2)}$$
Blinn-Phong分布函数不具有形状不变性。

Beckmann分布

Beckmann分布函数具有如下形式：
$$D(\pmb m)=\frac{1}{\pi\alpha^2(\pmb n\cdot\pmb m)^4}\exp(\frac{(\pmb n\cdot\pmb m)^2-1}{\alpha^2(\pmb n\cdot\pmb m)^2})$$

• Beckmann分布函数呈高斯函数形态，在对称轴$\pmb n\cdot\pmb m$处取得最值，如下图所示呈现一种中间亮两边暗的渲染效果。

Beckmann分布与Blinn-Phong分布可以通过关系式$\alpha_p=2\alpha_b^{-2}-2$进行等效，如下图所示，蓝色虚线为Blinn-Phong分布、绿色实线为Beckmann分布：

Beckmann分布函数具有形状不变性。

GGX（Trowbridge-Reitz）分布

GGX分布函数具有如下形式：
$$D(\pmb m)=\frac{\alpha^2}{\pi((\pmb n\cdot \pmb m)^2(\alpha^2-1)+1)^2}$$
GGX是目前业界最流行的微表面法线分布函数模型，因为它在主流模型中拥有最长的尾部，如下图所示，Beckmann分布函数会很快地逼近于0，而GGX能维持较长的一段尾部：

GGX分布函数具有形状不变性。

GTR（Generalized-Trowbridge-Reitz）分布

$$D(\pmb m)=\frac{c}{(1+(\pmb n\cdot\pmb m)^2(\alpha^2-1))^\gamma}$$

GTR分布函数不具有形状不变性。

#### 4.2.4. 各项异性的法线分布函数

$$D(\pmb m)=\frac{1}{\alpha^2(\pmb n\cdot\pmb m)^4}g\left(\frac{\sqrt{1-(\pmb n\cdot\pmb m)^2}}{\alpha(\pmb n\cdot\pmb m)}\right)$$

$$D(\pmb m)=\frac{1}{\alpha_x\alpha_y(\pmb n\cdot\pmb m)^4}g\left(\frac{ \sqrt{\frac{(\pmb t\cdot\pmb m)^2}{\alpha_x^2}+\frac{(\pmb b\cdot\pmb m)^2}{\alpha_y^2}}}{\pmb n\cdot\pmb m}\right)$$

$$D(\pmb m)=\frac{1}{\pi\alpha_x\alpha_y(\pmb n\cdot\pmb m)^4}\exp\left( -\frac{\frac{(\pmb t\cdot\pmb m)^2}{\alpha_x^2}+\frac{(\pmb b\cdot\pmb m)^2}{\alpha_y^2}}{(\pmb n\cdot\pmb m)^2}\right)$$

$$D(\pmb m)=\frac{1}{\pi\alpha_x\alpha_y}\frac{1}{\left(\frac{(\pmb t\cdot\pmb m)^2}{\alpha_x^2}+\frac{(\pmb b\cdot\pmb m)^2}{\alpha_y^2}+(\pmb n\cdot\pmb m)^2\right)^2}$$

### 4.3. 几何函数（Geometry Function）

$$\int_{m\in\Theta}G_1(\pmb m, \pmb v)D(\pmb m)(\pmb v\cdot\pmb m)^+\mathrm d\pmb m=\pmb v\cdot \pmb m$$

1. $G_1$：微表面在单个方向（光照方向或观察方向）上的可见比例，一般表示阴影函数或遮蔽函数
2. $G_2$：微表面在光照方向和观察方向上均可见的比例，一般表示联合遮蔽阴影函数

Smith模型具有不相关的表面，即每个微表面与其邻域不相关，与真实世界的连续微表面对比如下（右图为Smith模型）：

V-cavity遮蔽函数计算单独微表面上的散射并混合计算结果：

Heitz证明了Smith遮蔽函数是唯一既遵循公式：
$$\int_{m\in\Theta}G_1(\pmb m, \pmb v)D(\pmb m)(\pmb v\cdot\pmb m)^+\mathrm d\pmb m=\pmb v\cdot \pmb m$$

#### 4.3.1. Smith遮蔽函数

$$\int_{m\in\Theta}G_1(\pmb m, \pmb v)D(\pmb m)(\pmb v\cdot\pmb m)^+\mathrm d\pmb m=\pmb v\cdot \pmb m$$

$$G_1(\pmb m,\pmb v)=\chi^+(\pmb m,\pmb v)G_1'(\pmb v)$$

$$\int_{m\in\Theta}\chi^+(\pmb m,\pmb v)G_1'(\pmb v)D(\pmb m)(\pmb v\cdot\pmb m)\mathrm d\pmb m=\pmb v\cdot \pmb m$$

$$\pmb v\cdot \pmb m=G_1'(\pmb v)\int_{m\in\Theta}\chi^+(\pmb m,\pmb v)D(\pmb m)(\pmb v\cdot\pmb m)\mathrm d\pmb m$$

$$\tilde m(\pmb m)=(x_{\tilde m}, y_{\tilde m})=(-x_m/z_m,-y_m/z_m)$$

$$\pmb m(\tilde m)=(x_m,y_m,z_m)=\frac{1}{\sqrt{x_{\tilde m}^2+ y_{\tilde m}^2+1}}(-x_{\tilde m}, -y_{\tilde m},1)$$

$$\int_{-\infty}^\infty\int_{-\infty}^\infty P^{22}(\tilde m)\mathrm d\tilde m=1$$

$$\int_{\Omega}D(\pmb m)(\pmb n\cdot\pmb m)\mathrm d{\pmb m}=1$$

$$P^{22}(\tilde m)\mathrm d\tilde m=D(\pmb m)(\pmb n\cdot\pmb m)\mathrm d{\pmb m}$$

$$\int_{\Omega}\chi^+(\pmb m,\pmb v)D(\pmb m)(\pmb v\cdot\pmb m)\mathrm d\pmb m=\int_{-\infty}^\infty\int_{-\infty}^\infty \chi^+(\pmb m,\pmb v)\frac{\pmb v\cdot\pmb m(\tilde m)}{\pmb n\cdot\pmb m(\tilde m)}P^{22}(\tilde m) \mathrm d\tilde m$$

$$\pmb n\cdot\pmb m(\tilde m)=\frac{1}{\sqrt{x_{\tilde m}^2+ y_{\tilde m}^2+1}}$$

$$\chi^+(\pmb m,\pmb v)\pmb v\cdot\pmb m(\tilde m)=\frac{\chi^+(-x_0x_{\tilde m}-y_0y_{\tilde m}+z_0)(-x_0x_{\tilde m}-y_0y_{\tilde m}+z_0)}{\sqrt{x_{\tilde m}^2+ y_{\tilde m}^2+1}}$$

$$\int_{\Omega}\chi^+(\pmb m,\pmb v)D(\pmb m)(\pmb v\cdot\pmb m)\mathrm d\pmb m= \int_{-\infty}^\infty\int_{-\infty}^\infty \chi^+(-x_0x_{\tilde m}-y_0y_{\tilde m}+z_0)(-x_0x_{\tilde m}-y_0y_{\tilde m}+z_0) P^{22}(x_{\tilde m},y_{\tilde m})\mathrm dx_{\tilde m}\mathrm dy_{\tilde m}$$

\begin{align} &\int_{\Omega}\chi^+(\pmb m,\pmb v)D(\pmb m)(\pmb v\cdot\pmb m)\mathrm d\pmb m\\\\ =&\int_{-\infty}^\infty\int_{-\infty}^\infty\chi^+(-\sin\theta_ox_{\tilde m}+\cos\theta_o)(-\sin\theta_ox_{\tilde m}+\cos\theta_o)P^{22}(x_{\tilde m},y_{\tilde m})\mathrm dx_{\tilde m}\mathrm dy_{\tilde m}\\\\ =&\int_{-\infty}^\infty\chi^+(-\sin\theta_ox_{\tilde m}+\cos\theta_o)(-\sin\theta_ox_{\tilde m}+\cos\theta_o)\left(\int_{-\infty}^\infty P^{22}(x_{\tilde m},y_{\tilde m})\mathrm dy_{\tilde m}\right)\mathrm dx_{\tilde m}\\\\ =&\int_{-\infty}^\infty \chi^+(-\sin\theta_ox_{\tilde m}+\cos\theta_o)(-\sin\theta_ox_{\tilde m}+\cos\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m} \end{align}

$$P^2(x_{\tilde m})=\int_{-\infty}^{+\infty}P^{22}(x_{\tilde m},y_{\tilde m})\mathrm dy_{\tilde m}$$

$$-\sin\theta_ox_{\tilde m}+\cos\theta_o>0\Rightarrow x_{\tilde m}<\cot\theta_o$$

$$\int_{-\infty}^\infty \chi^+(-\sin\theta_ox_{\tilde m}+\cos\theta_o)(-\sin\theta_ox_{\tilde m}+\cos\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m}= \int_{-\infty}^{\cot\theta_o} (-\sin\theta_ox_{\tilde m}+\cos\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m}$$

$$\pmb v\cdot \pmb m=G_1'(\pmb v)\int_{m\in\Theta}\chi^+(\pmb m,\pmb v)D(\pmb m)(\pmb v\cdot\pmb m)\mathrm d\pmb m$$

$$\cos\theta_o=G_1'(\pmb v)\int_{-\infty}^{\cot\theta_o} (-\sin\theta_ox_{\tilde m}+\cos\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m}$$

$$\cot\theta_o=G_1'(\pmb v)\int_{-\infty}^{\cot\theta_o} (-x_{\tilde m}+\cot\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m}$$

$$\int_{-\infty}^{+\infty} x_{\tilde m}P^2(x_{\tilde m})\mathrm dx_{\tilde m}=0$$

$$\cot\theta_o=G_1'(\pmb v)\int_{-\infty}^{+\infty}x_{\tilde m}P^2(x_{\tilde m})\mathrm dx_{\tilde m}+ G_1'(\pmb v)\int_{-\infty}^{\cot\theta_o} (-x_{\tilde m}+\cot\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m}$$

\begin{align} (1-G_1'(\pmb v))\cot\theta_o+G_1'(\pmb v)\cot\theta_o =&G_1'(\pmb v)\int_{-\infty}^{+\infty}x_{\tilde m}P^2(x_{\tilde m})\mathrm dx_{\tilde m}+ G_1'(\pmb v)\int_{-\infty}^{\cot\theta_o} (-x_{\tilde m}+\cot\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m}\\\\ (1-G_1'(\pmb v))\cot\theta_o =&G_1'(\pmb v)\int_{-\infty}^{+\infty}x_{\tilde m}P^2(x_{\tilde m})\mathrm dx_{\tilde m}+ G_1'(\pmb v)\int_{-\infty}^{\cot\theta_o} (-x_{\tilde m}+\cot\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m}\\\\ &-G_1'(\pmb v)\cot\theta_o \end{align}

$$\int_{-\infty}^{+\infty} P^2(x_{\tilde m})\mathrm dx_{\tilde m}=1$$

$$G_1'(\pmb v)\cot\theta_o=G_1'(\pmb v) \int_{-\infty}^{+\infty} \cot\theta_oP^2(x_{\tilde m})\mathrm dx_{\tilde m}$$

\begin{align} (1-G_1'(\pmb v))\cot\theta_o=&G_1'(\pmb v)\int_{-\infty}^{+\infty}x_{\tilde m}P^2(x_{\tilde m})\mathrm dx_{\tilde m}+ G_1'(\pmb v)\int_{-\infty}^{\cot\theta_o} (-x_{\tilde m}+\cot\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m}\\\\ &-G_1'(\pmb v) \int_{-\infty}^{+\infty} \cot\theta_oP^2(x_{\tilde m})\mathrm dx_{\tilde m}\\\\ =&G_1'(\pmb v)\left(\int_{-\infty}^{+\infty}x_{\tilde m}P^2(x_{\tilde m})\mathrm dx_{\tilde m}-\int_{-\infty}^{\cot\theta_o} x_{\tilde m}P^2(x_{\tilde m})\mathrm dx_{\tilde m}\right)\\\\ &+G_1'(\pmb v)\left(\int_{-\infty}^{\cot\theta_o}\cot\theta_oP^2(x_{\tilde m})\mathrm dx_{\tilde m}-\int_{-\infty}^{\infty}\cot\theta_oP^2(x_{\tilde m})\mathrm dx_{\tilde m} \right)\\\\ =&G_1'(\pmb v)\int_{\cot\theta_o}^{+\infty}x_{\tilde m}P^2(x_{\tilde m})\mathrm dx_{\tilde m}-G_1'(\pmb v)\int_{\cot\theta_o}^{+\infty}\cot\theta_oP^2(x_{\tilde m})\mathrm dx_{\tilde m}\\\\ =&G_1'(\pmb v)\int_{\cot\theta_o}^{+\infty}(x_{\tilde m}-\cot\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m} \end{align}

$$\frac{1-G'_1(\pmb v)}{G'_1(\pmb v)}=\frac{1}{\cot\theta_o}\int_{\cot\theta_o}^{+\infty}(x_{\tilde m}-\cot\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m}$$

$$G_1'(\pmb v)=\frac{1}{1+\Lambda(\pmb v)}$$

$$\Lambda(\pmb v)=\frac{1}{\cot\theta_o}\int_{\cot\theta_o}^{+\infty}(x_{\tilde m}-\cot\theta_o)P^2(x_{\tilde m})\mathrm dx_{\tilde m}$$

$$G_1(\pmb m, \pmb v)=\frac{\chi^+(\pmb m\cdot\pmb v)}{1+\Lambda(\pmb v)}$$

Beckmann分布函数
\begin{align} P^{22}(x_{\tilde m},y_{\tilde m})&=\frac{1}{\pi\alpha^2}\exp\left(-\frac{x^2_{\tilde m}+y^2_{\tilde m}}{\alpha^2}\right)\\\\ D(\pmb m)&=\frac{1}{\pi\alpha^2(\pmb n\cdot\pmb m)^4}\exp(\frac{(\pmb n\cdot\pmb m)^2-1}{\alpha^2(\pmb n\cdot\pmb m)^2})\\\\ \Lambda(a)&=\frac{\mathrm{erf}(a)-1}{2}+\frac{1}{2a\sqrt{\pi}}\exp(-a^2) \end{align}

\begin{align} a&=\frac{\pmb n\cdot \pmb v}{a\sqrt{1-(\pmb n\cdot\pmb v)^2}}\\\\ \mathrm{erf}(x)&=\frac{2}{\sqrt{\pi}}\int_0^xe^{-x'^2}\mathrm dx'^2 \end{align}

$$\Lambda(a)=\begin{cases} \frac{1-1.259a+0.396a^2}{3.535a+2.181a^2},&a<1.6\\\\ 0,&a\geq 1.6 \end{cases}$$
**GGX分布函数**
\begin{aligned} P^{22}(x_{\tilde m},y_{\tilde m})&=\frac{1}{\pi\alpha^2\left(1+\frac{x^2_{\tilde m}+y_{\tilde m}^2}{\alpha^2}\right)^2}\\\\ D(\pmb m)&=\frac{\alpha^2}{\pi((\pmb n\cdot \pmb m)^2(\alpha^2-1)+1)^2}\\\\ \Lambda(a)&=\frac{-1+\sqrt{1+\frac{1}{a^2}}}{2} \end{aligned}

$$a=\frac{\pmb n\cdot \pmb v}{a\sqrt{1-(\pmb n\cdot\pmb v)^2}}$$

$$G_1(\pmb v)\approx \frac{2(\pmb n\cdot\pmb v)}{(\pmb n\cdot\pmb v)(2-\alpha)+\alpha}$$

#### 4.3.2. Smith联合遮蔽函数-阴影函数

\begin{align} G_2(\pmb v,\pmb l,\pmb m)&=G_1(\pmb v,\pmb m)G_1(\pmb l,\pmb m)\\\\ &=\frac{\chi^+(\pmb v\cdot\pmb m)}{1+\Lambda(\pmb v)}\frac{\chi^+(\pmb l\cdot\pmb m)}{1+\Lambda(\pmb l)} \end{align}

$$G_2(\pmb v,\pmb l,\pmb m)=\frac{\chi^+(\pmb v\cdot\pmb m)\chi^+(\pmb l\cdot\pmb m)}{1+\Lambda(\pmb v)+\Lambda(\pmb l)}$$

$$G_2(\pmb v,\pmb l,\pmb m)=\lambda(\phi)G_1(\pmb v,\pmb m)G_1(\pmb l,\pmb m)+(1-\lambda(\phi))\min(G_1(\pmb v,\pmb m),G_1(\pmb l,\pmb m))$$

$$\lambda(\phi)=1-e^{-7.3\phi^2}$$
van Ginneken则提出另外一种计算方法：
$$\lambda(\phi)=\frac{4.41\phi}{4.41\phi+1}$$

$$G_2(\pmb v, \pmb l,\pmb m)=\frac{\chi^+(\pmb v\cdot\pmb m)\chi^+(\pmb l\cdot\pmb m)}{1+\max(\Lambda(\pmb v),\Lambda(\pmb l))+\lambda(\pmb v\cdot\pmb l)\min(\Lambda(\pmb v),\Lambda(\pmb l))}$$

• 当出射方向与入射方向平行且$\lambda=0$时，遮蔽和阴影完全相关

• 相关性随着方向之间的夹角增加而减小，当$\lambda=1$时，遮蔽和阴影不再方向相关，而是退化为高度相关的形式

• $\lambda$的计算同样可以通过：
$$\lambda(\phi)=\frac{4.41\phi}{4.41\phi+1}$$
$\phi$为$\pmb v$和$\pmb l$之间的方位角

### 4.4. 菲涅尔反射

#### 4.4.1. 菲涅尔方程的推导

\begin{aligned} \nabla \cdot\pmb E &= 0\\\\ \nabla\cdot\pmb B&=0\\\\ \nabla\times \pmb E&=-\frac{\partial \pmb B}{\partial t}\\\\ \nabla\times \pmb B&=\varepsilon\mu\frac{\partial \pmb E}{\partial t} \end{aligned}

$$\begin{matrix} \nabla^2\pmb E=\mu\varepsilon\dfrac{\partial^2\pmb E}{\partial t^2}&\nabla^2\pmb B=\mu\varepsilon\dfrac{\partial^2\pmb B}{\partial t^2} \end{matrix}$$

$$\nabla^2f=\frac{1}{v^2}\frac{\partial^2 f}{\partial t^2}$$

$$v=\frac{1}{\sqrt{\mu\varepsilon}}$$

$$n=\sqrt{\frac{\varepsilon\mu}{\varepsilon_0\mu_0}}$$

$$u=\frac{1}{2}\left(\varepsilon E^2+\frac{1}{\mu}B^2 \right)$$

$$I=\frac{1}{2}\varepsilon vE_0^2$$

\begin{aligned} \varepsilon_1\pmb E_1^\perp-\varepsilon_2\pmb E_2^\perp&=0\\\\ \pmb E_1^{\parallel}-\pmb E_2^{\parallel}&=0\\\\ \pmb B_1^\perp-\pmb B_2^\perp&=0\\\\ \frac{1}{\mu_1}\pmb B_1^\parallel-\frac{1}{\mu_2}\pmb B_2^\parallel&=0 \end{aligned}

\begin{align} \tilde{\pmb E}_ I(z,t)&=\tilde E_{0I}e^{i(k_1z-\omega t)}\hat{\pmb x}\\\\ \tilde{\pmb B}_ I(z,t)&=\frac{1}{v_I}\tilde E_{0I}e^{i(k_1z-\omega t)}\hat{\pmb y} \end{align}

\begin{align} \tilde{\pmb E}_ R(z,t)&=\tilde E_{0R}e^{i(-k_1z-\omega t)}\hat{\pmb x}\\\\ \tilde{\pmb B}_ R(z,t)&=-\frac{1}{v_1}\tilde E_{0R}e^{i(-k_1z-\omega t)}\hat{\pmb y} \end{align}

\begin{align} \tilde{\pmb E}_ T(z,t)&=\tilde E_{0T}e^{i(k_2z-\omega t)}\hat{\pmb x}\\\\ \tilde{\pmb B}_ T(z,t)&=\frac{1}{v_2}\tilde E_{0T}e^{i(k_2z-\omega t)}\hat{\pmb y} \end{align}

\begin{align} \tilde E_{0I}+\tilde E_{0R}&=\tilde E_{0T}\\\\ \frac{1}{\mu_1}\left(\frac{1}{v_1}\tilde E_{0I}-\frac{1}{v_1}\tilde E_{0R} \right)&=\frac{1}{\mu_2}\left(\frac{1}{v_2}\tilde E_{0T}\right) \end{align}

\begin{aligned} \tilde E_{0R}=\left(\frac{1-\beta}{1+\beta}\right)\tilde E_{0I}\\\\ \tilde E_{0T}=\left(\frac{2}{1+\beta}\right)\tilde E_{0I} \end{aligned}

$$\beta\equiv \frac{\mu_1v_1}{\mu_2v_2}=\frac{\mu_1n_2}{\mu_2n_1}$$

\begin{aligned} \tilde E_{0R}=\left(\frac{v_2-v_1}{v_2+v_1}\right)\tilde E_{0I}\\\\ \tilde E_{0T}=\left(\frac{2v_2}{v_2+v_1}\right)\tilde E_{0I} \end{aligned}

\begin{aligned} E_{0R}=\left|\frac{v_2-v_1}{v_2+v_1}\right|E_{0I}=\left|\frac{n_1-n_2}{n_1+n_2}\right|E_{0I}\\\\ E_{0T}=\left|\frac{2v_2}{v_2+v_1}\right|E_{0I}=\left|\frac{2n_1}{n_1+n_2}\right|E_{0I} \end{aligned}

$$R\equiv\frac{I_R}{I_I}=\left(\frac{E_{0R}}{E_{0I}}\right)^2=\left(\frac{n_1-n_2}{n_1+n_2}\right)^2$$

$$T\equiv\frac{I_T}{I_I}=\frac{\varepsilon_2v_2}{\varepsilon_1v_1}\left(\frac{E_{0T}}{E_{0I}}\right)^2=\frac{4n_1n_2}{(n_1+n_2)^2}$$

\begin{align} \tilde{\pmb E}_ I(\pmb r,t)&=\tilde E_{0I}e^{i(\pmb k_I\cdot\pmb r-\omega t)}\\\\ \tilde{\pmb B}_ I(\pmb r,t)&=\frac{1}{v_1}(\tilde{\pmb k_I}\times\tilde{\pmb E_I}) \end{align}

\begin{align} \tilde{\pmb E}_ R(\pmb r,t)&=\tilde {\pmb E}_{0R}e^{i(\pmb k_R\cdot\pmb r-\omega t)}\\\\ \tilde{\pmb B}_ R(\pmb r,t)&=\frac{1}{v_1}(\tilde{\pmb k_R}\times\tilde{\pmb E_R}) \end{align}

\begin{align} \tilde{\pmb E}_ T(\pmb r,t)&=\tilde {\pmb E}_{0T}e^{i(\pmb k_T\cdot\pmb r-\omega t)}\\\\ \tilde{\pmb B}_ T(\pmb r,t)&=\frac{1}{v_2}(\tilde{\pmb k_T}\times\tilde{\pmb E_T}) \end{align}

$$k_Iv_1=k_Rv_1=k_Tv_2=\omega$$

$$\pmb k_I\cdot \pmb r=\pmb k_R\cdot\pmb r=\pmb k_T\cdot\pmb r$$

$$x(k_I)_x+y(k_I)_y= x(k_R)_x+y(k_R)_y= x(k_T)_x+y(k_T)_y$$

$$(k_I)_y=(k_R)_y=(k_T)_y$$

$$(k_I)_x=(k_R)_x=(k_T)_x$$

1. 入射光、反射光和折射光矢量在同一个平面内（称为入射面），入射面法线也在入射面内，同时满足：
$$k_I\sin\theta_I=k_R\sin\theta_R=k_T\sin\theta_T$$
式中，$\theta_I$为入射角，$\theta_R$为反射角，$\theta_T$为折射角，都是相对于法线方向考虑

2. 由于$k_1v_1=k_Rv_1=\omega$，因此$k_I=k_R$，于是有入射角等于反射角：
$$\theta_I=\theta_R$$
即反射定律

3. 由$k_Iv_1=k_Tv_2=\omega$，可得
$$k_I=\frac{n_1}{n_2}k_T$$
因此有
$$\frac{\sin\theta_T}{\sin\theta_I}=\frac{n_1}{n_2}$$
即折射定律，又称斯涅尔定律

\begin{aligned} \varepsilon_1(\tilde {\pmb E}_ {0I}+\tilde{\pmb E}_ {0R})_z&=\varepsilon_2(\tilde {\pmb E}_ {0T})_z\\\\ (\tilde {\pmb B}_{0I}+\tilde{\pmb B}_ {0R})_z&=(\tilde {\pmb B}_ {0T})_z\\\\ (\tilde{\pmb E}_{0T}+\tilde {\pmb E}_ {0R})_{x,y}&=(\tilde {\pmb E}_ {0T})_{x,y}\\\\ \frac{1}{\mu_1}(\tilde{\pmb B}_ {0T}+\tilde {\pmb B}_ {0R})_{x,y}&=\frac{1}{\mu_2}(\tilde {\pmb B}_ {0T})_{x,y} \end{aligned}

\begin{align} \varepsilon_1(-\tilde E_{0I}\sin\theta_I+\tilde E_{0R}\sin\theta_R)&=\varepsilon_2(-\tilde E_{0T}\sin\theta_T)\\\\ \tilde E_{0I}\cos\theta_I+\tilde E_{0R}\cos\theta_R&=\tilde{E}_{0T}\cos\theta_T\\\\ \frac{1}{\mu_1v_1}(\tilde E_{0I}-\tilde E_{0R})&=\frac{1}{\mu_2v_2}\tilde E_{0T} \end{align}

\begin{aligned} \tilde E_{0I}-\tilde E_{0R}&=\beta\tilde E_{0T}\\\\ \tilde E_{0I}+\tilde E_{0R}&=\alpha\tilde E_{0T} \end{aligned}

\begin{align} \alpha&\equiv\frac{\cos\theta_T}{\cos\theta_I}\\\\ \beta&\equiv\frac{\mu_1v_1}{\mu_2v_2}=\frac{\mu_1n_2}{\mu_2n_1} \end{align}

\begin{aligned} \tilde E_{0R}&=\left(\frac{\alpha-\beta}{\alpha+\beta}\right)\tilde E_{0I}\\\\ \tilde E_{0T}&=\left(\frac{2}{\alpha+\beta}\right)\tilde E_{0I} \end{aligned}

$$\alpha=\frac{\sqrt{1-\sin^2\theta_T}}{\cos\theta_I}=\frac{\sqrt{1-[(n_1/n_2)\sin\theta_I]^2}}{\cos\theta_I}$$

$$\sin^2\theta_B=\frac{1-\beta^2}{(n_1/n_2)^2-\beta^2}$$

$$I_I=\frac{1}{2}\varepsilon_1v_1E_{0I}^2\cos\theta_I$$

\begin{align} I_R&=\frac{1}{2}\varepsilon_1v_1E_ {0R}^2\cos\theta_R\\\\ I_T&=\frac{1}{2}\varepsilon_2v_2E_ {0T}^2\cos\theta_T \end{align}

\begin{aligned} R&\equiv\frac{I_R}{I_I}=\left(\frac{E_{0R}}{E_{0I}}\right)^2=\left(\frac{\alpha-\beta}{\alpha+\beta}\right)^2\\\\ I_T&\equiv\frac{I_T}{I_I}=\frac{\varepsilon_2v_2}{\varepsilon_1v_1}\left(\frac{E_{0T}}{E_{0I}}\right)^2\frac{\cos\theta_T}{\cos\theta_I}=\alpha\beta\left(\frac{2}{\alpha+\beta}\right)^2 \end{aligned}

#### 4.4.2. Schlick近似

$$R(\theta)=R_0+(1-R_0)(1-\cos\theta)^5$$

$$R_0=\left(\frac{n_1-n_2}{n_1+n_2}\right)^2$$

### 4.5. 镜面反射项

1. 法线分布函数$D(\pmb m)$
2. 几何函数$G(\pmb m,\pmb v)$
3. 菲涅尔项$F(\pmb v,\pmb m)$

#### 4.5.1. 半矢量

$$\pmb h=\widehat{\pmb v+\pmb l}$$

#### 4.5.2. Torrance-Sparrow模型

Torrance-Sparrow模型是微表面BRDF的一个经典模型，其镜面反射项与IlumEngine中所用的Cook-Torrance BRDF几乎一致，这里以Torrance-Sparrow模型为例推导从微表面模型到基于物理的BRDF。

$$\mathrm dA(\pmb \omega_h)=D(\pmb \omega_h)\mathrm d\pmb \omega_h\mathrm dA$$

\begin{align} \mathrm d\Phi_h&=L_i(\pmb \omega_i)\mathrm d\pmb \omega_i\mathrm dA^\perp(\pmb \omega_h)\\\\ &=L_i(\pmb \omega_i)\mathrm d\pmb \omega_i\cos\theta_h\mathrm dA(\pmb \omega_h)\\\\ &=L_i(\pmb \omega_i)\mathrm d\pmb \omega_i\cos\theta_hD(\pmb \omega_h)\mathrm d\pmb \omega_h\mathrm dA \end{align}

$$\mathrm d\Phi_o=F(\pmb \omega_o)\mathrm d\Phi_h$$

$$L(\pmb \omega_o)=\frac{\mathrm d\Phi_o}{\mathrm d\pmb \omega_o\cos\theta_o\mathrm dA}$$

$$L(\pmb \omega_o)=\frac{F(\pmb \omega_o)L_i(\pmb \omega_i)\mathrm d\pmb \omega_iD(\pmb \omega_h)\mathrm d\pmb \omega_h\mathrm dA\cos\theta_h}{\mathrm d\pmb \omega_o\mathrm dA\cos\theta_o}$$

$$\frac{\mathrm d\pmb \omega_h}{\mathrm d\pmb \omega_i}=\frac{\sin\theta_h\mathrm d\theta_h\mathrm d\phi_h}{\sin\theta_i\mathrm d\theta_i\mathrm d\phi_i}$$

\begin{align} \frac{\mathrm d\pmb \omega_h}{\mathrm d\pmb \omega_i}=\frac{\mathrm d\pmb \omega_h}{\mathrm d\pmb \omega_o} &=\frac{\sin\theta_h\mathrm d\theta_h\mathrm d\phi_h}{\sin\theta_i\mathrm d\theta_i\mathrm d\phi_i}\\\\ &=\frac{\sin\theta_h\mathrm d\theta_h\mathrm d\phi_h}{2\sin2\theta_h\mathrm d\theta_h\mathrm d\phi_h}\\\\ &=\frac{1}{4\cos\theta_h}\\\\ &=\frac{1}{4(\pmb \omega_i\cdot\pmb \omega_h)}=\frac{1}{4(\pmb \omega_o\cdot\pmb \omega_h)} \end{align}

$$L(\pmb \omega_o)=\frac{F(\pmb \omega_o)L_i(\pmb \omega_i)D(\pmb \omega_h)\mathrm d\pmb \omega_i}{4\cos\theta_o}$$

$$f_r(\pmb \omega_o,\pmb \omega_i)=\frac{F(\pmb \omega_o)G(\pmb \omega_o,\pmb \omega_i)D(\pmb \omega_h)}{4\cos\theta_o\cos\theta_i}=\frac{F(\pmb \omega_o)G(\pmb \omega_o,\pmb \omega_i)D(\pmb \omega_h)}{4(\pmb \omega_o\cdot \pmb n)(\pmb \omega_i\cdot \pmb n)}$$

## 5. PBR着色模型

### 5.1. Cook-Torrance BRDF

$$f_r(\pmb \omega_o,\pmb \omega_i)=(1-F(\pmb\omega_o))\frac{\rho}{\pi}+\frac{F(\pmb \omega_o)G(\pmb \omega_o,\pmb \omega_i)D(\pmb \omega_h)}{4(\pmb \omega_o\cdot \pmb n)(\pmb \omega_i\cdot \pmb n)}$$

• $\rho$为Albedo，材质的颜色

• $F(\pmb\omega_o)$为菲涅尔系数，选用Schlick近似
\begin{align} F(\theta)&=F_0+(1-F_0)(1-\cos\theta)^5\\\\ F_0&=\left(\frac{n_1-n_2}{n_1+n_2}\right)^2 \end{align}

• $D(\pmb \omega_h)$为法线分布函数，选用GGX分布
$$D(\pmb \omega_h)=\frac{\alpha^2}{\pi((\pmb n\cdot \pmb \omega_h)^2(\alpha^2-1)+1)^2}$$

• $G(\pmb\omega_o,\pmb\omega_i)$为几何函数，选用Smith分布的Schlick近似
$$G(\pmb \omega_o,\pmb\omega_i)=\frac{\pmb \omega_o\cdot\pmb\omega_h}{(\pmb \omega_o\cdot\pmb\omega_h)(1-k)+k}$$
其中，$k=\frac{(\alpha+1)^2}{8}$

### 5.2. 金属工作流

Cook-Torrance BRDF中的Schlick近似的菲涅尔公式只能用于描述电介质材质（水、玻璃），对于导体（如金属）则需要使用另外一个菲涅尔公式，对材质设计造成不变，金属工作流则使用金属度参数进行插值金属属性，使得菲涅尔公式同时可以用于描述电介质和导体，非金属的$F_0$默认为0.04，而金属的$F_0$则为表面颜色，通过金属度插值$F_0$的GLSL代码如下：

 1 2  vec3 F0 = vec3(0.04); F0 = mix(F0, albedo, metallic); 

Roughness = 0.1 Roughness = 0.4 Roughness = 0.7 Roughness = 1.0
Metallic = 0.1
Metallic = 0.4
Metallic = 0.7
Metallic = 1.0

### 5.3. 多次弹射Kulla-Conty能量补偿

Heitz于2016年给出了能量补偿问题的精确解，但由于计算量过大并不适合于实时渲染，Kulla和Conty则给出了一种近似的能量补偿算法。

$$E(\mu_o)=\int_0^{2\pi}\int_0^1f(\mu_o,\mu_i,\phi)\mu_i\mathrm d\mu_i\mathrm d\phi$$

Kulla-Conty方法的核心思想是设计另外一个BRDF，满足积分为$1-E(\mu_0)$，则这个能量将作为能量补偿项。

$$f_{ms}(\mu_o,\mu_i)=\frac{(1-E(\mu_o))(1-E(\mu_i))}{\pi(1-E_{avg})}$$

$$E_{\mathrm{avg}}=2\int_0^1E(\mu)\mu\mathrm d\mu$$

\begin{align} E_{ms}(\mu_o) &=\int_0^{2\pi}\int_0^1f_{ms}(\mu_o,\mu_i,\phi)\mu_i\mathrm d\mu_i\mathrm d\phi\\\\ &=2\pi\int_0^1\frac{(1-E(\mu_o))(1-E(\mu_i))}{\pi(1-E_{\mathrm{avg}})}\mu_i\mathrm d\mu_i\\\\ &=2\frac{1-E(\mu_o)}{1-E_{\mathrm {avg}}}\int_0^1(1-E(\mu_i))\mu_i\mathrm d\mu_i\\\\ &=\frac{1-E(\mu_o)}{1-E_{\mathrm {avg}}}(1-E_{\mathrm {avg}})\\\\ &=1-E(\mu_o) \end{align}

$$E_{\mathrm{avg}}=\frac{\int_0^1F(\mu)\mu\mathrm d\mu}{\int_0^1\mu\mathrm d\mu}=2\int_0^1F(\mu)\mu\mathrm d\mu$$

• 一次弹射之后：$F_{\mathrm{avg}}(1-E_{\mathrm{avg}})\cdot F_{\mathrm{avg}}E_{\mathrm{avg}}$
• ……
• $k$次弹射之后：$F_{\mathrm{avg}}^k(1-E_{\mathrm{avg}})^k\cdot F_{\mathrm{avg}}E_{\mathrm{avg}}$

$$\sum_{k=0}^\infty F_{\mathrm{avg}}^k(1-E_{\mathrm{avg}})^k\cdot F_{\mathrm{avg}}E_{\mathrm{avg}}=\frac{F_{\mathrm{avg}}E_{\mathrm{avg}}}{1-F_{\mathrm{avg}}(1-E_{\mathrm{avg}})}$$

\begin{aligned} F_{\mathrm{avg}}(r,g)&\approx 0.087237 + 0.0230685g - 0.0864902g^2 + 0.0774594g^3\\\\ &+ 0.782654r - 0.136432r^2 + 0.278708r^3\\\\ &+ 0.19744gr + 0.0360605g^2r - 0.2586gr^2; \end{aligned}

### 6. 参考资料

【基于物理的渲染（PBR）白皮书】（一） 开篇：PBR核心知识体系总结与概览

【基于物理的渲染（PBR）白皮书】（二） PBR核心理论与渲染光学原理总结

【基于物理的渲染（PBR）白皮书】（四）法线分布函数相关总结

【基于物理的渲染（PBR）白皮书】（五）几何函数相关总结

Akenine-Moller, Tomas, Eric Haines, and Naty Hoffman. Real-time rendering. AK Peters/crc Press, 2019.

Pharr, Matt, Wenzel Jakob, and Greg Humphreys. Physically based rendering: From theory to implementation. Morgan Kaufmann, 2016.

GAMES202:高质量实时渲染

Griffiths, David J. “Introduction to electrodynamics.” (2005): 574-574.

Wenbo Chen
CG Student