pouët.net

Go to bottom

Antialiasing in opengl. Is there a way to do...

category: general [glöplog]
 
Hi all,

I'm using multisampling in opengl through the arb extension. Everything works as expected - no jaggies over the edges of triangles any more ! However,

Assume that I have a textured mapped polygon. I cannot see any antialiasing over the texture itself (which could be very useful when I have alpha blended triangles with alpha test/masking). I wonder if there is a way around that and what is the best way to antialiase the textures themselves. Any ideas ?
added on the 2008-08-08 12:44:48 by Navis Navis
alpha to coverage (gl_sample_alpha_to_coverage or something) is what you want i think.
added on the 2008-08-08 12:51:53 by smash smash
Check out the Humus' example.
added on the 2008-08-08 12:58:20 by masterm masterm
Navis: For antialiased alpha-test to work you need supersampling, not multisampling. With multi-sampling, the same fragment color is assigned to all covered samples of a pixel, causing the same alpha value to be alpha-tested. With super-sampling, a new fragment is shaded for each sample of a pixel, giving potentially unique alpha-values to be tested.

Alpha to coverage is a good way of getting a similar effect, as suggested by smash.
added on the 2008-08-08 17:37:16 by kusma kusma
Humus rocks :D
added on the 2008-08-08 18:36:07 by pera pera
Quote:
best way to antialiase the textures themselves

Anisotropic filtering?
added on the 2008-08-09 18:42:35 by xernobyl xernobyl
I thought anistropic filtering was for getting a better image quality on non-orthogonally projected textures with respect to the point of view. so i guess supersampling is what is needed and not anisotropic filtering.
added on the 2008-08-09 23:18:15 by decipher decipher
Or just do a flatshaded quad per texel... a 40000 poly torus looks great that way! :)
added on the 2008-08-10 00:57:46 by winden winden
From wikipedia:
Quote:
Like bilinear and trilinear filtering it eliminates aliasing effects, but introduces less blur at extreme viewing angles and thus preserves more detail
added on the 2008-08-10 01:26:57 by xernobyl xernobyl
now that his problem is solved, can I troll and say that opengl is better than directx?
added on the 2008-08-10 01:32:43 by LiraNuna LiraNuna
BB Image
added on the 2008-08-10 01:36:48 by Salinga Salinga
liranuna: fraid not, it works fine on d3d too. :)
added on the 2008-08-10 11:35:00 by smash smash
liranuna: claiming you invented OpenGL is more your style ;)
oh Mall-E now that hurts :(
added on the 2008-08-10 21:54:07 by LiraNuna LiraNuna
that's because the truth hurts!
hahaha :D
score :D
added on the 2008-08-11 07:20:16 by skrebbel skrebbel

login

Go to top