• 周五. 4月 26th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

Blinn–Phong vs Phong

admin

11月 28, 2021

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

好处在于:

  1. angle(V, R) 的取值范围在 [0, 180°],cos 值可能为负,此时用 max or clamp 直接截断会导致明显的明暗边缘。而 angle((L+V)/2, N) 的取值范围在 [0, 90°],cos 值不可能为负,所以明暗过渡平滑。
  2. 半程向量比反射向量计算量小。

WebGL Phong Shading demo 测试一下效果:

明暗过渡问题:

【Jim Blinn 是个非常有趣的人,他的 Jim Blinns Corner 系列都是用自己的表情包作封面hhhh】

《Blinn–Phong vs Phong》有3个想法
  1. 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

  2. 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.

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注