PDA

View Full Version : whte thingy



ironHead
06-24-2004, 04:20 AM
I have written a flat shading app... I want to anti-alias the whole view, white streak appears between the lines and the polygon..... help

Aeluned
06-24-2004, 04:40 AM
could you post a screen shot?

Relic
06-24-2004, 07:11 AM
From the description it sounds like the usual polygon_smooth with depth buffering issue.
The edges between polygons are blocked by the depth buffer value of the first polgon which touches them, they antialias with the background and the next polygon sharing that edge cannot add to the final color anymore.
The color of the stitches is dependent on the drawing order, means the background color at the time the first polygon touches it.

Read the RedBook (OpenGL programming guide) on polygon antialising and you'll find that you need to disable depth buffering, enable the special blending mode which saturates alpha, and sort you polygons from front to back, because the saturation should not block the frontmost polygons.

This is so yesterday. ;)
Search the forum for multisampling.
You can programmatically enable a full scene antialiased pixelformats if your implementation supports it. You don't need to change your main rendering code like for polygon_smooth method then.

ironHead
06-24-2004, 09:31 AM
image: C:\Documents and Settings\matthewg\Desktop\help.jpg

ZbuffeR
06-24-2004, 11:00 AM
>>C:\Documents and Settings\matthewg\Desktop\help.jpg

Well done ! Now we all know that your screenshot lies on your windows desktop ... :D

06-25-2004, 01:44 AM
yes i know its an old issue, can u please tell me how to achieve it using stencil buffer .....links will be gr8.

Relic
06-25-2004, 01:54 AM
Stencil buffer? You mean antialiasing with the accumulation buffer?
There's an example in the RedBook.
http://www.sgi.com/software/opengl/advanced97/programs/accumaa.c

Also see this for all sorts of basics (chapter 9 for antialiasing):
http://www.opengl.org/resources/tutorials/sig99/advanced99/notes/

Learn to use google.