When I use Exp or Exp2 fog in vertex mode I have a strange effect with big triangles when I rotate the camera. I concluded that the fog calculations are wrong. When I use Linear fog all is ok. Small triangles also looks as they must.
Do you have some ideas what is the problem

I have some artifacts with fog
Eric Charran
No, no, no. I have much more strange effects. When I slighttly rotate the camera, the fog can greatly change, and there may be some sharp lines of fog (on the one side there is fog and on the other there isn't) and they also can greatly change with slight rotation of camera. It doesn't matter whether range-based fog enabled or not. Also I aleready said that this effects does not affect on small triangles. If I split my big triangle into smaller ones, effect will gone. And I sorry... Linear fog causes the same effect.
I can post you some screenshots, but don't know how.
sangee
So why didn't you describe them in your original message
Still sounds like a problem with having range-based fog disabled. Remember, vertex fog only calculates the fog values at the vertices.
Does your video card support ranged-based vertex fog
The difference between range-based fog and non-ranged-based fog is less significant for smaller triangles.
You didn't say that before, but it does sound like you've already found the solution to your problem. This will also solve vertex lighting artifacts that can occur with big triangles.
If you don't like the solution you've already found then have you tried using the reference rasterizer and seeing if it also generates the same artifacts Are you setting a compliant projection matrix Have you run your application using the debug runtime and checked the debug output
bas31
Do you have range fog enabled It sounds like when you're using linear fog you're getting range fog, but when you using exponential fog you're not. Without range-based fog enabled the amount of fogging depends on the distance between the vertex and the near clip plane, while with range-based fog it depends on the distance from the viewpoint. If you don't use range-based fog then the amount fogging applied to a vertex will change when you rotate the camera. See the DirectX documentation topic on "Vertex Fog" for more details.
PeterR1
It looks like when I don't see one vertex of my triangle DirectX replaces it by two located at intersection of triangle's side and screen border, and calculates fog for them. That's why fog can greatly change - when I see vertex all is ok, but when it goes out of screen it becomes replaced by two and interpolated accordingly.
However, I will use the solution I've already found because there is some other problems. Because vertex fog only calculates the fog values at the vertices, when I located at center of it, all triangle has high fog values. And I can't use table fog - it looks really bad.
So, problem is solved.