On Sun, 2008-11-09 at 05:30 +0100, Manuel Massing wrote:
> Hi Stuart,
> 
> Attached is a small fix for the sorting in CloudShaderGeometry.cxx.
> I think the sorting problem stems from the osg idiosyncracy
> to store transposed matrices...so the intuitive
> 
>       osg::Vec4f p = vm * osg::Vec4f(_cloudsprites[i]->position.osg(), 1.0f);
> 
> needs to be replaced with...
> 
>       osg::Vec4f p = vm.preMult(osg::Vec4f(_cloudsprites[i]->position.osg(), 
> 1.0f);
> 
> The patch also optimizes the distance calculation - it evaluates the 
> distances 
> in model space instead of eye space, which reduces computation to a dot-
> product instead of a matrix multiplication.
> 
> bye, 
> 
>       Manuel

Well, that seems to have solved the alpha blending issues!  Thanks!

Is this applicable to the trees, too?

Ron



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to