Why my material isn't working?

Solution: need to add exponential fog to scene and check “volumetric fog” parameter.