View Full Version : smooth lighting???
04-15-2001, 10:29 AM
I know opengl uses gourad lighting so one polygon only gets one lighted color. So how would you do smooth lighting like in plate 24 (pictures) of the red book? (like the light in the basement)
04-16-2001, 05:20 AM
I believe by default the shade model is GL_FLAT, so yes, one polygon gets only one color. With GL_SMOOTH the colors are interpolated between the vertices.
04-16-2001, 08:49 PM
Gourad lighting means that the lights are interpolated between the vertices but all OpenGL implementations must support at least 8 lights. The lower limit is 8 lights for each polygon and not one.
How to do smooth lighting is a big and difficult question. If you have many small polygons will the standard OpenGL lights look good. Check out the nvidia developer pages for lots of information about this. The new, cool way is by using vertex programs.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.