PDA

View Full Version : OpenGL smooth shading



Ralf Euser
04-24-2007, 08:11 AM
Is it possible to shade a gl_quad with 4 different vertex colors applied, into some sort of shading color steps..??? So that the result is not entirely smooth shaded.

Greets,

Ralf Euser

AnselmG
04-24-2007, 08:35 AM
I am now sure if I understand in detail what you want to do, but to get something like for example a color ramp with 16 colors from black to white you could just render the quad in a resolution of 16 pixels...

predaeus
04-24-2007, 08:52 AM
or prepare some texture and disable texel interpolation when applying it to the quad

Ralf Euser
04-24-2007, 11:53 PM
Hi,

Thanks for the advice. But how do I create such a color ramp? (For example the one with 16 colors)