BRDF LUT

分解BRDF模型

基于Unreal使用的BRDF模型

Microfacet Specular BRDF

$f(l,v)=\frac{D(\theta_{h})F(\theta_{d})G(\theta_{v}, \theta_{l})}{4 \cdot cos^{+}\theta_{v} \cdot cos^{+}\theta_{l}}$

Specular D

$D(\theta_{h})=\frac{\alpha^{2}}{\pi[cos^{2}\theta_{h}(\alpha^{2}-1)+1]^{2}}$
$\alpha=Roughness^{2}$

烘焙$D(cos^{+}\theta_{h}, Roughness)$到R通道(截取至[0,4]后映射到[0,1]区间)

Specular F

$F(\theta_{d})=F_{0}+(1-F_{0}) \cdot 2^{(-5.55473 \cdot cos^{+}\theta_{d}-6.983166) \cdot cos^{+}\theta_{d}}$

烘焙$F(cos^{+}\theta_{d}, F_{0})$到G通道

Specular G

$G(\theta_{v}, \theta_{l})=G_{1}(\theta_{v}) \cdot G_{1}(\theta_{l})$
$G_{1}(\theta)=\frac{cos^{+}\theta}{cos^{+}\theta \cdot (1-k)+k}$
$k=\frac{(Roughness+1)^{2}}{8}$

烘焙$G_{1}(cos^{+}\theta, Roughness)$到B通道

烘焙结果