> The landmass shader looks like you fixed something :)

Great to hear - so presumably it was the things Emilian identified (?!)-  I 
haven't fixed anything else.

> Flickering is gone in all settings and i have only some small artifacts
> visible in the distance while having snow cover and fog. Looks great
> overall.

This has to do with a pitfall of procedural texturing, which I am just learning 
to deal with most efficiently.

The problem appears if you have structures far away which are smaller than a 
pixel. The rendering procedure does not sample many subpixels to determine the 
color of the final pixels (as a real camera would do) - it samples just a few 
(or even one) - so if you have a high contrast structure inside a faraway pixel 
(like snow on a dark ground), the pixel color fluctuates as the view moves as 
sometimes the pixel is white if the rendering procedure hits snow, sometimes 
dark as it hits the ground, but never grey as it shoud become.

If normal texturing, the problem is taken care off by mipmapping - the mipmaps 
automatically average out the details as distance grows. In procedural 
texturing, it has to be done manually, so beyond a certain distance, 
meter-sized patterns of snow and ground have to be replaced by their average 
value explicitly to take care of the flickering.

The straightforward solution is to simply compute if a structure is smaller 
than a pixel and fade them out accordingly - which is what I'm doing in the new 
ultra terrain shader, but this is fairly expensive. The current scheme for snow 
uses a proxy which leads to flickering now and then, but is significantly 
faster (I benchmarked the difference to 20% in the final framerate on the 
GeForce 8600M, so I am reluctant to implement the exact procedure everywhere as 
the residual flickering of snow is probably tolerable).

More generally, I wonder if we should remove random vegetation (the shrubs 
populating shrubland lead to rather pronounced flickering, so do faraway trees) 
with the same criterion? 

> Transition shader works now on the mountain areas like rock, but only the
> airfield are / grass is still flickering like before.

That's a different shader - the normal terrain is done in a top-down approach 
in which the large scale structures are (as in the default scheme) mainly 
encoded in the landclass specific texture and the details as one gets closer 
are generated by the shader.

The airfield grass is a bottom-up approach where the close range visuals are 
generated by the basic  texture sheet. This would lead to severe tiling 
problems when seen from a bit farther away, so the shader in this case 
generates the pattern variation which is seen from the distance and does 
suitable de-tiling.

As for the flickering, making the assumption that this landclass will almost 
always be nearly flat, I have yesterday implemented a fast and efficient scheme 
to remove it. I think this qualifies as a bugfix, so I will push it as soon as 
I am back at a fast internet connection.

* Thorsten
------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to