PDA

View Full Version : glShadeModel and glLightModel with GLSL



Yezu666
04-05-2011, 06:06 AM
Hi!
I'm wondering if there's any point in using glShadeModel and glLightModel functions while using shaders?

I've been looking through the docs and failed to get an answer.

I'm asking about OGL 2.1 but I'd be interested if the same applies to the newer versions.

thanks :)

V-man
04-05-2011, 10:44 AM
Yes, glShadeModel has an effects since this controls how values are interpolated across a triangle.

As for lighting, you are suppose to do the lighting yourself in a vertex shader or fragment shader. All glLight functions are irrelevant including glLightModel.

Alfonse Reinheart
04-05-2011, 02:09 PM
Yes, glShadeModel has an effects since this controls how values are interpolated across a triangle.

When you don't explicitly state it in the shader, that is.

Yezu666
04-06-2011, 02:36 AM
Ok. I think I understand. Thanks a lot :)