| Lighting Shaders |
|
|
|
| Written by Jay Taoko |
| Sunday, 26 April 2009 19:36 |
|
Ever since I released the Phong shader demo, it felt natural that I should do a program featuring other lighting model available in the computer graphics literature. You know the common models: Phong and Blinn. Yet there are other models that have interesting properties: Oren-Nayar, Cook-Torrance, Strauss, Ward and Ashikhmin-Shirley. I had a lot of help coming from this page: D3DBook. The shaders I use to implement the lighting models are heavily inspired from the shaders available at this link. Every lighting model as a set of unique parameters accessible from the corresponding tad view on the control panel. The last tab view named "All Shaders" allows you to visualize all the lighting model at the same time. If you check the option "Global Color" you can assign the same diffuse an specular color to all the lighting model while you are on the "All Shaders" tab view.
Lighting Shaders.
There is one light in the scene and its position is fixed. You may wanna the different mesh available in the control interface. In mt opinion, using the sphere mesh gives you a better idea of the lighting model properties.
Lighting model with a sphere mesh.
For the controls, use the left mouse to rotate the camera around the object and the right mouse the move the camera closer or away from the object.
The executable for the demo is available here.
Bookmark
Email this
Hits: 1360 Comments (0)
![]() Write comment
|




