Phong
1975 Illumination for Computer Generated Pictures
S_p = C_p(cos(i) * (1 - d) + d) + W(i) * pow(cos(s), n)
Blinn-Phong
1977 Models of Light Reflection for Computer Synthesized Pictures
i = P_a + d * P_d + s * P_s
d = max(0, dot(N, L))
s = pow(cos(N, H), c_1)
H = (L + V) / 2
Jim Blinn 对 Phong 模型的改进在于高光部分:cos(V, R) => cos((L+V)/2, N) 。
好处在于:
- angle(V, R) 的取值范围在 [0, 180°],cos 值可能为负,此时用 max or clamp 直接截断会导致明显的明暗边缘。而 angle((L+V)/2, N) 的取值范围在 [0, 90°],cos 值不可能为负,所以明暗过渡平滑。
- 半程向量比反射向量计算量小。
WebGL Phong Shading demo 测试一下效果:
明暗过渡问题:
【Jim Blinn 是个非常有趣的人,他的 Jim Blinns Corner 系列都是用自己的表情包作封面hhhh】
Wow, incredible blog layout! How long have you been running a blog for?
you make running a blog glance easy. The overall look of your
web site is wonderful, let alone the content material!
You can see similar here sklep
Existe alguma maneira de recuperar o histórico de chamadas excluídas? Aqueles que possuem backup na nuvem podem usar esses arquivos de backup para restaurar registros de chamadas de celular.
Wow, amazing blog structure! How long have you been running a
blog for? you made blogging glance easy. The entire look of your web
site is wonderful, let alone the content! You can see similar here sklep internetowy