Quote:

A way might be to alter the terrainshader, to support the fogmap additionally, as a
fifth skin,
is that what you ment?




Yes of course

easy to do.. set the terrain skin like this in the material defineiiton:

Skin3=fogmap;

and then in the shader file sample the skin like this (put this right near the other samplers):

texture mtlSkin3;

sampler fogMapSampler = sampler_state
{
Texture = (mtlSkin3);
MinFilter = Linear;
MagFilter = Linear;
MipFilter = Linear;
AddressU = clamp;
AddressV = clamp;
};

and in code for the pixel shader do this at very end, right before the line "return FinalColor;":

float fogmap = tex2D(fogMapSampler,In.MaskCoord);
Finalcolor.rgb*=fogmap;


Sphere Engine--the premier A6 graphics plugin.