> I don't think the Model matrix will help you much either, as IIRC
> (0,0,0) is the center of the earth spheroid.

Hm, the line is

  gl_Position = gl_ModelViewProjectionMatrix * gl_Position;

Doesn't gl_ModelViewProjectionMatrix transform things into 2d screen
coordinates?

Would it work if I use a different matrix instead? Apparently

    vec4 groundPoint = gl_ModelViewMatrix * vec4(0.0, 0.0, 0.0, 1.0);

can be used to generate the zero altitude point just below the current
view, so then the length of the difference vector dotted with an 'up'
normal would represent altitude (?)

> What do you need it for? sunrise/sunset lighting?

Yes, the earthShade factor should affect objects dependent on their
altitude, basically I want glowing high-altitude clouds whereas the lower
clouds are still dark.

* Thorsten


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual 
desktops for less than the cost of PCs and save 60% on VDI infrastructure 
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to