Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Jesper T

how to make GL_SMOTH work

This topic is 6352 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
...on nvidia geforce GL_NORMALIZE have zero performance penalty...

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!