Re: R: R: [Plib-users] Transparent texture
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-06-20 03:21:57
|
Paolo Leoncini wrote: > > Thanks, Steve, for the useful suggestions - I finally saw those > semi-translucent textures in my database. What I did? these simple three > things: > > 1. glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) > so to not actually need alpha planes still getting roughly good blending; Yep - only a few rather esoteric algorithms actually need destination alpha - and quite a few graphics cards don't support them. > 2. mat->enable( GL_BLEND ) and mat->setAplhaClamp(0.01) > the latter to get the full [0:255] alpha range; Yep. > 3. switch for tests to a AccellGraphics GMX2000-equipped NT box (!!!!) > instead of my G200 on NT, which soon switch to software with as few as > 2.5Mtexels loaded and doesn't want to know about alpha-ed textures (latest > driver, of course). I'm not familiar with Windoze drivers - but a board shouldn't switch to software rendering just because you are using too much texture memory. It might take a while to swap maps in and out of memory - but it's probably still hardware accellerated. Dunno why G200 would have trouble with alpha - it works OK under Linux. > Since I would like to rely on (3DS) modeller's information as much as > possible, a further little work will focus on automatically set those > properties for transparent textures (only the image loader knows about the > 2/4-components) - the AppStateCallback seems once again the final resource. Well, I guess whatever the problem is should be fixed - but I still believe that most applications will want to use AppStateCallback in the end. > Furthermore one has also to "isolate" translucent objects from the rest of > the database for rendering with z-buffer disabled after all other objects, > for best blending results. SSG does that automatically for you. -- Steve Baker http://web2.airmail.net/sjbaker1 sjb...@ai... (home) http://www.woodsoup.org/~sbaker sj...@ht... (work) |