View Full Version : per pixel lighting
02-05-2010, 05:06 AM
i am new to openGL, i am learning what people call the fixed pipeline(?), anyhow i am learning the classic ogl with the red book, i have a question regarding per pixel lighting, is it possible to achieve ppl with classic openGL api, not using GLSL ?
02-05-2010, 08:12 AM
Possible but way harder than glsl : you can mess with register combiners or ASM shaders, but IMHO it is much better to go with GLSL.
And what do you mean by "classic GL api" ? To me GL 2 is "classic", and have GLSL.
02-05-2010, 08:20 AM
ZbuffeR is right. You can do portable per-pixel lighting with pre-GLSL stuff only with ASM shaders or texture combiners, or the vendor specific stuff like NVIDIA register combiners & texture shaders or ATI fragment shaders.
However, it is less straightforward than using GLSL so you should either stick to fixed function per-vertex lighting or move to GLSL if possible, or if it is not available on the target card, you can use texture combiners. However, per-pixel lighting on pre-GLSL capable cards is not a performance-wise idea for general use.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.