I gave up on the wiki code and tried the sun/fog code from a code you (mat) posted earlier. I can now see models and they react with fog, but no shine effect. I believe the problem is in the "return" line, but nothing I try works. Can anyone spot my mistake?
Code:
 
float4x4 matWorldViewProj;
float4x4 matView;
float4x4 matWorld;

float4 vecSkill41;

float4 vecViewPos;
float4 vecFog;
float4 vecSkill1;
float4 ambientcolor={0.3,0.3,0.3,0.0}; //can also use vecLight here for true ambient color
float4 suncolor={0.8,0.8,0.7,0.0}; //define the suncolor here, could also pass it from the script in a mtl skill


texture entSkin1;
texture entSkin2;

sampler ColorMapSampler = sampler_state
{
Texture = <entSkin1>;
MinFilter = Linear;
MagFilter = Linear;
MipFilter = Linear;
AddressU = wrap;
AddressV = wrap;
};


sampler BumpMapSampler = sampler_state
{
Texture = <entSkin2>;
MinFilter = Linear;
MagFilter = Linear;
MipFilter = Linear;
AddressU = wrap;
AddressV = wrap;
};





struct VS_OUTPUT {
float4 Pos: POSITION;
float2 texCoord: TEXCOORD0;
// float3 Sun: TEXCOORD1;

float3 View4 : TEXCOORD3;

float3 Sun : TEXCOORD1;
float Fog : FOG;

};


VS_OUTPUT VS1(float4 inPos: POSITION, float3 normal: normal, float3 tangent: TANGENT, float2 texCoord : TEXCOORD0) {
VS_OUTPUT Out;


Out.Pos = mul(inPos, matWorldViewProj);

////////////////////

// Some object-linear texgen, specific for this particular model
Out.texCoord.x = inPos.x * 0.0065 + 0.46;
Out.texCoord.y = inPos.z * 0.0065 + 0.46;
Out.texCoord = texCoord;

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

float3 Pview = -mul(matView, inPos);

// Move our tangent-space into eye-space

float3 vtang = mul(matView, tangent);
float3 vbinorm = mul(matView, cross(tangent, normal));
float3 vnorm = mul(matView, normal);


// We use lightVec = viewVec, that is, the camera is also the light.
float3 Sun = Pview;

// Transform light vector from eye-space to tangent-soace
Out.Sun.x = dot(Sun, vtang);
Out.Sun.y = dot(Sun, vbinorm);
Out.Sun.z = dot(Sun, vnorm);

//
float3 Viewer4 = PosWorld - vecViewPos;
Out.View4 = mul(Pview, -Viewer4); // V

//sunlight
Out.Sun.xyz = mul(Pview, vecSkill1); // L
//

return Out;
}



/////////////////////Pixel Shader

float4 Gold = float4(0.3,0.3,0.3,0.0);
//float4 Gold: register(c1);

sampler ColorMap: register(s0);
sampler BumpMap: register(s1);

float4 PS1(float2 texCoord: TEXCOORD0, float3 Sun: TEXCOORD1, float3 View4: TEXCOORD3, float Fog: FOG) : COLOR {
float4 color = tex2D(ColorMapSampler, texCoord);
float3 bump = tex2D(BumpMapSampler, texCoord) * 2.0 - 1.0;

//bump=normalize(bump);

float3 ViewDir4 = normalize(View4);
//sunlight
float3 ViewSun = normalize(Sun);
float4 diff7 = saturate(dot(bump, ViewSun)); // diffuse component
float3 Reflect7 = normalize(2 * diff7 * bump - Sun); // R
float4 spec7 = pow(saturate(dot(Reflect7, ViewDir4)), 64);
float shadow7 = saturate(4 * diff7);


// shine = diffuse and specular
// float shine = saturate(dot(normalize(Sun), normalize(bump)));
// return (shine * 0.2) * color + pow(shine, 64) * Gold;

return
(
(ambientcolor * 2.0) * color + ((shadow7* (color * diff7 + (spec7*color.w))) * Gold)
);


/*
return
(
(ambientcolor * color) + //ambient ambientcolor = Sun

((shadow7* (color * diff7 + (spec7*color.w))) * suncolor)
);
*/

}


technique Gold_shine
{
pass p0
{

VertexShader = compile vs_2_0 VS1();
PixelShader = compile ps_2_0 PS1();
}
}