Re: [Algorithms] Texture Atlas and mipmapping problem
Brought to you by:
vexxed72
From: <fr...@ho...> - 2007-04-06 16:26:01
|
Atlases are a hug gain of performance for a 3D engine. Then a gain of money= for people who materize it. That's what i think. =20 Then I can't answer your question directly. =20 All I can say is... that's possible. You can correct the infinite-wrap-mipm= apping problem with a shader 3 card without a lots of efforts and without u= sing the expensive dd* instructions. =20 With more efforts (and shader time, but not too much), you can do it with a= shader 2 card. Here is the real tricky part. The fact of "knowing that it is possible" is 50% of the work. Good luck. Fred Brach-------------------------------------- Chronophage Games=20 > Date: Fri, 6 Apr 2007 12:21:11 +0200> From: ke...@la...> To: gdalgor= ith...@li...> Subject: [Algorithms] Texture Atlas and m= ipmapping problem> > Hi all,> > I'm doing some tests on texture splatting f= or terrains using a Texture > atlas, which stores the different ground type= s. The rendering goes fine, > but the mipmapping gives me a headache.> > Le= t me explain my situation: each ground type is tiled across the > terrain (= wrap address mode, scaled and biased in the pixelshader to > sample the atl= as correctly and support texture filtering), though seams > are visible bet= ween the tiles (only when mipmapping is enabled though). > I think I unders= tand why this happens: at the border of each "wrap" the > texture coordinat= es go from 0.99999f to 0.00001f, which is a huge jump > and the lowest mipm= ap is thus sampled for that texel.> When I give the lowest mipmap in my tex= ture an explicit color (like, > red), then you can clearly see that it is t= he lowest mipmap that peaks > through the tiles.> > I read the article in S= hader X3 on using texture atlasses, and there the > author calculates the d= dx and ddy of the texture coordinates and uses > these in the HLSL "tex2D"-= instruction to aid in sampling the correct > mipmap.> This indeed solves th= e mipmap problem, but it really hurts the framerate > (almost 1/3 less on a= nVidia 7800 GT card).> > Is there any reason why this goes so slow?> Perha= ps someone here has experience using texture atlasses and knows > another w= ay of solving the mipmap problem?> > Thanks a lot in advance!> > ----------= ---------------------------------------------------------------> Take Surve= ys. Earn Cash. Influence the Future of IT> Join SourceForge.net's Techsay p= anel and you'll get the chance to share your> opinions on IT & business top= ics through brief surveys-and earn cash> http://www.techsay.com/default.php= ?page=3Djoin.php&p=3Dsourceforge&CID=3DDEVDEV> ____________________________= ___________________> GDAlgorithms-list mailing list> GDAlgorithms-list@list= s.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/gdalgorithm= s-list> Archives:> http://sourceforge.net/mailarchive/forum.php?forum_name= =3Dgdalgorithms-list _________________________________________________________________ Exprimez-vous : cr=E9ez la page d'accueil qui vous ressemble avec Live.com. http://www.live.com/getstarted= |