Constant fog or looking through a glass

I want to blend the color of the fragments already built with a different color, typically the background color.

Typically this is similar to fog, except that in fog the blending between the two colors depends of depth,
while in my case, it should be constant for all fragments
already built (say, as objects behind a green glass).

The effect should then be switched off, because objects drawn later, are on this side of the glass, and
should show their real color.

As I said, Fog is working for me now, but I would like
to remove the depth dependency. Moreover the depth
test slows down the calculations.

Could someone give me a clue? Thanks a lot!

why not draw a fullscreen blending polygon ?

That’s propably the best solution, thanks!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.