Manuel Massing wrote: > 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.
Great - I was wondering if my sorting was working properly. Obviously it wasn't! Thank-you very much for taking the time to look at the problem and for the patch. I really appreciate you taking the time to correct my programming errors. -Stuart ------------------------------------------------------------------------- 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