Hi,

On Nov 9, 2008, at 3:30 PM, Ron Jensen wrote:

> 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!

Not 100% but way much better than the last one. 
I saw some unexpected sky/scenery blending, probably when a half of cloud is in 
front of another one and the other half has nothing behind, but I'm not 100% 
sure on this.

Anyway, it's one more great step up!

By the way, I found a very interesting thing that the clouds always face to the 
aircraft.
I placed ufo in the middle of clouds and made a spin by pressing left cursor.
Then all the clouds were turning toward me, changing their order.
I don't complain about this. it's rather cute to see these are facing me and 
say "Hi!" :-)

Best,



-------------------------------------------------------------------------
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