How is it independent of it? I mean, in a sense, I see what you mean: You and I agree that it is best not to be mean to people, and we come to that conclusion despite differing views on the supernatural;
But - my views on the supernatural have changed dramatically from when I was younger. My "moral code" or whatever you'd call it, has not. In fact, one of the stepping stones in my journey away from religious belief was C.S. Lewis's discussion of whether good acts, done for non-religous reasons, had any value or worth to them at all, to which he answered no. (Vastly oversimplified, of course.) I would say that my views on ethics and morality are not in fact related to my views on the supernatural, much less "based on."