> Emilian and I have been busy investigating the integration of these > shaders > into the shader system that we are evolving. The good news is that we > have > come up with a fog function that can be easily included in all relevant > shaders. The bad news is that in doing so we have bumped up against what > we > believe are bugs in your original shaders. The haze seem to work fine in > some situations - but not in others.
I've been unable to clone your GIT repository from home (it was one of those <20 kbit/sec days), but I think I have successfully addressed several (all?) issues in my working copy of the shaders. > In particular, there is a problem > over > the ocean: > > http://imageshack.us/photo/my-images/217/fgfsscreen031.jpg/ > > this is caused, we think, by the haze being attached to the vertices in > the tile in the .vert. This appears to be largely gone for me now (?). I suspect the cause may have been the line fogCoord = abs(ecPosition.z / ecPosition.w); which I found in the original default.vert and used as distance measure - which it isn't however. > The long-standing issue of the number of tiles loaded needs to be > resolved - > the haze no longer hides the join: > > http://imageshack.us/f/825/fgfsscreen033.jpg/ > > but this isn't a unique haze problem. This was an easy one (and the reason I asked about this a while ago) - I had assumed that visibility is one optical attenuation length, however it several, so the task was to work out the precise assumption of the tile manager, and the number turns out to be two, so I inserted that into the fogging function and all tiles are then fogged out before the tile manager unloads them. This led to the discovery of a bug which drew the default skydome background in a slightly wrong color (it didn't account for the scattering parameter whereas terrain-haze did) which should now also be fixed in the skydome code. Downtown SF with the default sky: http://www.phy.duke.edu/~trenk/pics/shadertest1.jpg and for the same visibility (ground-visibility-m is set to zero, so there is no ground layer effect here) with the skydome-terrain-haze shaders: http://www.phy.duke.edu/~trenk/pics/shadertest2.jpg which now shows about the same visual impression for when objects can no longer be seen. And with the ground haze on - 6000 m haze thickness, about 12 km visibility inside the layer http://www.phy.duke.edu/~trenk/pics/shadertest3.jpg I'll package and upload all this to the forum link tomorrow (my upload here is as bad as my download) and let you know. I haven't tested all possible conditions (lighting, low/extremely high altitude,...) but I think this is some progress. Cheers, * Thorsten ------------------------------------------------------------------------------ The demand for IT networking professionals continues to grow, and the demand for specialized networking skills is growing even more rapidly. Take a complimentary Learning@Cisco Self-Assessment and learn about Cisco certifications, training, and career opportunities. http://p.sf.net/sfu/cisco-dev2dev _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel