how to make GL_SMOTH work

Started by
2 comments, last by Jesper T 22 years, 8 months ago
Im having trouble getting the textures of an object smooth (look at screenshots here http://home.online.no/~7396/delta/ ) I have the glShadeModel(GL_SMOOTH); in the initialising function and draw the object using GL_QUADS with normal vectors in a loop. (where I get all the values from some code I put together to make curved looking objects.) Im also wondering if it is possible to make the light beeing calculated from the angle to the normal vector only. Since the larger the quad is, the longer the normal vector gets and then it gets too bright compared to other smaller quads facing the same direction. Thanks for any help
Advertisement
Cant be sure but are those per face normals rather than per vertex? if so that will solve your problem by changing it to pervertex.
I''m not quite sure I understand your other question about the lighting getting brighter but from what you wrote, I understand it as that you''r not normallising your normals, all normals for lighting in openGL should be normalised/unit vectors or whateverr you want to call them, you should ideally do this yourself though you can make gl do it for you but at a performance cost( glEnable(GL_NORMALISE); or something similar but I dont recomend doing it this way, do it yourself is the better way in most situations I belive.

Hope thats some help.
yep, the normals is per face, ill try making one per vertex, thanks
...on nvidia geforce GL_NORMALIZE have zero performance penalty...

This topic is closed to new replies.

Advertisement