On Thursday, October 18, 2012 06:43:32 Renk Thorsten wrote:
> >> Speaking of which - it'd be nice to have local north as well defined
> >> direction as well - that would allow for things like the snowline
> >> being higher on south slopes ...
> > 
> > In the Northern hemisphere ;-)
> 
> Quite so - but once you have a north-pointing vector, the rest is trivial
> because you can pass geographical location as uniform and use that to
> compute the magnitude and sign of the bias in a one-liner...
> 
> * Thorsten

vec3(1.0,0.0,0.0) seems to be a pretty good aproximation. 
In my tests dot(normal.xy, vec2(1.0,0.0)) worked good enough. (for N 
hemisphere)

Btw, in terrasync terrain you can safely use gl_Vertex.z as altitude. 
There are some issues with that one, but only in custom terrain generated 
after 2009, which you're not interested in supporting anyway.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to