Per vertex fog (Custom Effect)

I just want to make a simple per vertex fog with XNA, I thought, it will be easy, but...

The problem is: if I set everything correct (I think), only the objects get the fog, not the scene/ screen! But why?

I set this parameters:
FogEnable = true;
FogColor = 1.0f;

And I use the FOG semantic in the vertex shader:
OUT.FogD = saturate( (fFogEnd - d) / (fFogEnd - fFogStart) );

So why happen this?

[417 byte] By [ShAdeVampirE] at [2007-12-29]
# 1
Here is the code, if it's needed: Code (txt)
ShAdeVampirE at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 2

I think thats correct, only the meshes you apply the shader to will get the fog.

Fluxtah at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 3
No, I don't think so, because I tried it with a single textured triangle...
ShAdeVampirE at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 4

And even if I try with the XNA part doesn't work:

m_graphics.GraphicsDevice.RenderState.FogEnable = true;
m_graphics.GraphicsDevice.RenderState.FogColor = Color.White;
m_graphics.GraphicsDevice.RenderState.FogEnd = 10;

ShAdeVampirE at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...
# 5

The fog effect will only effect the geometry that you apply the shader to, I am sorry if you do not like this answer, but its a fact.

Fluxtah at 2007-9-4 > top of Msdn Tech,Game Technologies: DirectX, XNA, XACT, etc.,XNA Framework...