PDA

View Full Version : Smoothing



link19
06-28-2001, 04:56 AM
Hi,
I have rendered 64*64 points (GL_POINTS). Id like it to look smoother ,so that each point becomes a part of the next.
Can i do this using points? or is there a better method? is this complicated? does anyone have some ideas on how to implement this?
Any suggestions are welcome and appreciated.

ngill
06-28-2001, 03:13 PM
Yup!! just make another 64x64 array, and then each element is the weighted sum of the original array element and it's neighbors...

Let me clarify.

for example final[x][y]=original[x][y]/2.0+original[x+1][y]/8.0+original[x-1][y]/8.0+original[x][y-1]/8.0+original[x][y+1]/8.0;

or some varitions of that... that'll do http://www.opengl.org/discussion_boards/ubb/smile.gif

If you want do smooth textures and such, glConvolutionFilter2D() or something was added in OpenGL 1.2

ngill
06-28-2001, 03:15 PM
don't forget about edges and corners http://www.opengl.org/discussion_boards/ubb/wink.gif... u'll have to use another formula for them. But that should be easy to figure out.

Good Luck and Have fun coding.
--Navreet