in your vertex shader output struct declare this

float Fog : FOG;

and in the vertex shader itself do something like this:

float3 PosWorld = mul(Pos, matWorld);
float ofog = 1 - (distance(PosWorld, vecViewPos) - vecFog.x) * (vecFog.z);
Out.Fog = ofog;

you also have to declare vecViewPos and vecFog of course so add this at the top of your fx file
float4 vecViewPos;
float4 vecFog;

that should be it.

You could also try to set
FogEnable = False;
in your technique. That might work for some shaders.


Shade-C EVO Lite-C Shader Framework