The religion of the future will be a cosmic religion. The religion which based on experience, which refuses dogmatic. If there's any religion that would cope the scientific needs it will be Buddhism.
When we have become free, we need not go mad and throw up society and rush off to die in the forest or the cave; we shall remain where we were but we shall understand the whole thing. The same phenomena will remain but with a new meaning.