Clipping away pixels if they are beyond the far-fog plane is a must for object shaders; besides, it makes sense to equalize the far-clip plane with the far-fog plane. --- When I think about it, there are actually some disadvantages with PP-based distance fog in some cases.

1) you need a depthmap
2) if you have alpha-objects, you are screwed

Well, if you have other distance-based PP effects (like DOF) running, 1) might be no problem at all, but if you do distance fog only for the sake of "doing it PP", it makes no sense.

2) is of a general concern and can be overcome if you are treating alpha transparency in general with mechanics like alpha-to-coverage.

Well, if you have large amounts of serious alpha-objects onscreen it might be wise to calculate the fogging on a per-pixel basis because it might look better in the end. But if you have mostly solid or cutout objects onscreen (and another effect that uses a depthmap, like DOF), do it PP.

Last edited by HeelX; 11/27/12 21:28.