I was looking around Thorsten Renk's fix at https://sourceforge.net/p/flightgear/fgdata/ci/69e8d90247df250ba552825b0e6164133314c7bf/ to see if maybe something else disabled it and while playing around I see that changing this in the file Shaders/model-ALS-ultra.frag:
- Code: Select all
vec3 up;
if (building_flag == 1) // osg_ViewMatrix contains the transforms of animations, but doesn't work for random buildings
{
up = (gl_ModelViewMatrix * vec4(0.0,0.0,1.0,0.0)).xyz;
}
else
{
up = (osg_ViewMatrix * vec4(0.0,0.0,1.0,0.0)).xyz;
}
with this:
- Code: Select all
vec3 up;
up = (gl_ModelViewMatrix * vec4(0.0,0.0,1.0,0.0)).xyz;
fixes the bug but I am sure this probably creates other bugs that I didn't notice yet (probably it breaks the effects on the airplanes, but the planes I looked at seem fine at first glance) since I have absolutely no idea what it does because I have no knowledge of 3d programming.
I only posted this temporary solution as a possible helpful hint for the developers who know what all this means to maybe come with a proper fix.
The easiest way to reproduce for me is to set visibility at 1000 on some airport with buildings on the other end of the runway with all ALS shaders at max.
Completely disabling the model shader makes the buildings behave properly so that's where the problem seems to be.