Frederic BOUVIER wrote: > I wrote: > > > We can also begin to think about a multi pass method that would : > > 1. draw the clouds above the viewer without depth update, > > 2. draw the scene, > > 3 .redraw the clouds above with depth test > > Thinking more about it, for the record if someone wants to toy with this : > 0. clear the stencil buffer > 1. draw the clouds above the viewer without depth update, > 2. draw the scene with stencil buffer write enabled ( terrain and objects > overwrite all clouds, even those that are between the viewer and the terrain ) > 3 .redraw the clouds above with depth test and stencil test to only > update terrain that can be obscured by clouds - this should clear the transparency > 'drawn twice' problem > > > With an impact on framerate due to double writing and problem like > > the one Melchior is experiencing with overlapping semi transparent > > objects. Haven't thought about it much of that. > > Obviously, this should be optional to accomodate less capable hardware
I manage to implement this algorithm tonight. The results are here : 1. /sim/rendering/multi-pass-clouds=false : http://perso.wanadoo.fr/frbouvi/flightsim/fg-multip-off-1.jpg (204kb) 2. /sim/rendering/multi-pass-clouds=true : http://perso.wanadoo.fr/frbouvi/flightsim/fg-multip-on-1.jpg (198kb) 3 /sim/rendering/multi-pass-clouds=true ( billboard tree detail ) : http://perso.wanadoo.fr/frbouvi/flightsim/fg-multip-on-2.jpg (106kb) If you think it's worth being in the release ( being optional thanks to property ), just speak and I will prepare a patch tomorrow evening ( sky.[ch]xx was touched in SimGear, main.cxx in flightgear, preferences.xml in fgfsbase ) Otherwise, I'll hold off until the release is out. Cheers, -Fred _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
