most useful shader effects have already been written.. just find examples of the effect you want and try to convert it over..The heavy duty optical theorizing is usually the domain of the PHDs who write papers -- then engineers develop workable implementations..for instance most of the theory that we now use for perpixel lighting was done by Phong and Blinn more than 20 years ago. It's instructive to go back to Phong's original paper on real-time lighting written many years ago.. and you will begin to understand the maths behind the optical approximations. Blinn is easier to understand than Phong tho..