
What are these weird artifacts that show up over the terrain when shaders are on? Well, they should (and will in 930) look like this:
In X-Plane 8, variation is created by using multiple layers, each one applying a texture at a different offset. This technique works on a wide range of hardware, but is inefficient - it causes overdraw (which we know is very bad).
So in X-Plane 9 I replaced this layer-based variation with a pixel shader algorithm. This means less information in the DSF (which means smaller DSFs, faster loading and less RAM use), but it also means variation is only visible to those with shaders. Having the pixel shaders create variation dynamically on the GPU is called "auto-variation" (and is invoked via the AUTO_VARY command in a .ter file).
The artifact above was a bug in the auto-variation shader. With the code now fixed (the 930 patch will contain the fix), here are some images of how it is supposed to work:
Here we have the texture in question, at two different offsets.


This black and white texture is the "mixing mask" used to select which offset to use.

And this is the final result.
Here we have the texture in question, at two different offsets.


This black and white texture is the "mixing mask" used to select which offset to use.

And this is the final result.
There is a little bit more disruption in the columns of green park.


0 comments:
Post a Comment