TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Could anyone explain Phong shading in a relatively accessible way?

1 点作者 ComradeUlyanov大约 3 年前
The Wikipedia article on the topic and the formula simply confuse me.

1 comment

Someone大约 3 年前
Please read and learn from <a href="http:&#x2F;&#x2F;www.catb.org&#x2F;~esr&#x2F;faqs&#x2F;smart-questions.html" rel="nofollow">http:&#x2F;&#x2F;www.catb.org&#x2F;~esr&#x2F;faqs&#x2F;smart-questions.html</a>. As is, we have to guess at what you know and don’t know.<p>My knowledge&#x2F;memory may be a bit rusty, but let’s try to do that (basically rephrasing Wikipedia, leaving out some details, but that sometimes helps). I’ll assume you know what triangles are ;-), what a triangular mesh is and what shading is.<p>With Gouraud shading, you compute the shading at each visible vertex of your model and interpolate the shading of all other points in each visible polygon from the shading of each of its vertices.<p>Computing shading involves computing a surface normal and, then, using a reflection model to compute what a given point looks like.<p>With Phong shading, you compute the surface normal at each visible vertex of your model, interpolate the surface normal of of all other points in each visible polygon from the surface normal of each of its vertices, and then compute the shading of each point using that surface normal.<p>That’s more work (you have to interpolate vectors, and, more importantly, have to apply your reflection model at each point, rather than only at each vertex), but gives better results.