I am making a terrain demo.
I render the terrain in 6 passes (for 6 textures).
The first pass draw texture 1.
The other passes draw texture 2-6 over the previous one using blend func (one, one).
I use a vertex and a pixel shader to blend my terrain textures…
But my problem is that I dont know how make the fog working when there are multiple rendering pass and blend (one, one).
Please help if you have any idea ?? may be adding a 7th pass for the fog but I dont know how it is possible…
(PS: My fog work well when I render all the 6 textures in one pass in a vertex/pixel shader)