3D그래픽2011. 9. 2. 15:24
Phong Shading 이란 용어는 그래도 어느정도 들어봤는데, 이와 관련된 내용을 찾다보면 per-pixel lighting 이라던지 per-fragment lighting 이라는 용어가 계속 튀어 나온다. 그래서 내가 뭔가 잘못 알고 있는건가 고민하다가 찾아보기로 결심!

Wikipedia의 내용으로 정리 해 본다.

Gouraud shading, named after Henri Gouraud, is an interpolation method used in computer graphics to produce continuous shading of surfaces represented by polygon meshes. In practice, Gouraud shading is most often used to achieve continuous lighting on triangle surfaces by computing the lighting at the corners of each triangle and linearly interpolating the resulting colours for each pixel covered by the triangle. Gouraud first published the technique in 1971.
  
OpenGL ES 1.x의 fixed pipeline에 구현되어 있는 것으로 알 고 있다. Goraud shading은 vertex에 대해서 연산을 수행하고, 각 pixel(fragment)에 대해서는 단순히 linear interpolation을 하기 때문에, 왼쪽 그림과 같이 polygon의 수가 적은경우 어색할 수 밖에 없다. 다만 1971년에 나온 기술이라니, 그 당시 이러한 연구를 했다는 것 자체가 너무 신기하다.


Phong shading refers to an interpolation technique for surface shading in 3D computer graphics. It is also called Phong interpolationnormal-vector interpolation shadingper-fragment lighting or per-pixel-based lighting. Specifically, it interpolates surface normals across rasterized polygons and computes pixel colors based on the interpolated normals and a reflection model. Phong shading may also refer to the specific combination of Phong interpolation and the Phong reflection model.
결과적으로 Phong shading과 per-pixel lighting 등등은 모두 동일한 용어! : )
normal을 interpolation해서 pixel(또는 fragment)마다 연산을 수행하는 것이 특징. 당연히 더욱 부드럽게 보일 수 있지만 연산량은 Goraud shading에 비해 엄청나게 많아질 수 밖에 없다.



이제 궁금증을 해결 했으니 다시, shader coding의 세계로...

'3D그래픽' 카테고리의 다른 글

Bézier, Gouraud, Fresnel 의 발음  (0) 2011.09.08
Transforms (변환 행렬)  (0) 2011.09.06
Normal Transform(법선벡터 변환)  (0) 2011.09.02
COLLADA (3D Asset Exchange Schema)  (0) 2011.08.31
OpenGL ES 2.0 Q&A by myself  (5) 2011.07.12
Posted by 세월의돌