PDA

View Full Version : Opengl shading



hayden
03-09-2013, 12:54 PM
I am learning different OpenGL shading examples. I am able to implement flat and gouraud shading. Can anyone help me with a simple example on phong shading? Thak you.

Aleksandar
03-09-2013, 02:16 PM
Did you try to google with right keywords? There's a plenty of tutorials on the net. For example: http://www.ozone3d.net/tutorials/glsl_lighting_phong.php

hayden
03-09-2013, 06:05 PM
Does it mean that phong shading can't be implemented without GLSL i.e. just with OpenGL?

Aleksandar
03-10-2013, 01:36 AM
Legacy OpenGL (i.e. fixed functionality) supports only two types of shading: flat and Gouraud (i.e. "smooth"). The desired shading model is set by glShadeModel() function call. For anything else (like Phong shading) you need GLSL.