I have been experimenting with refraction shader and glass shader (using cycles render) and i noticed that a sphere with refraction shader looks almost the same compared to a sphere that has glass shader. 1)The only difference i noticed with the refraction shader compared to the glass shader is that when a light ray enters the material (that has refraction shader applied), the light ray ,that enters the material, changes once direction because of the ior (but cant bounce back) and when the ray exits the material it can't bounce back ,inside the material, but it can still change direction(because of ior) when it comes out. Can someone help me spot out the difference? Is 1) correct?
Firstly I'd like to point out that shaders are called BSDFs in cycles, and raytracing in general.
The difference is that the glass BSDF is essentially a mix of a refraction BSDF and a glossy BSDF - it reflects light as well as refracting it. The glass BSDF is designed to make glass and similar materials easier to simulate - otherwise you would manually need to mix a refraction BSDF and a glossy BSDF.
You can see the similarities in that the Glass shader is the refraction shader with some more bits added. Note the weird black artefacts in the Refraction BSDF, whereas the Glass BSDF has the rays bounce off the interior more realistically. For an even more realistic shader, you would want to mix a Refraction with Glossy BSDF - the Glass BSDF is just intended to be easy to use and do what the name says, AFAIK. (Edit: a glass BSDF is extremely similar, or possibly identical, to a refraction BSDF mixed with a glossy BSDF with the factor set to a fresnel node. The fresnel node returns values based on the angle of the surface to the camera. If you want to simulate glass and have more control over these kinds of things, this might be a better setup, although if you're just beginning to use Cycles then glass should do for now.)
Here's a picture showing two cubes with those two different materials applied, but with the same final result (one is a Refraction BSDF mixed with a Glossy with a Fresnel node as the factor, the other is a Glass BSDF):
If I had set up the scene better and put another object next to the cube you would see it reflecting off the glass BSDF but not off the refraction.
I can't offer an explanation for the black bits in the Refraction BSDF, but I suspect it has something to do with the way the renderer processes internal light bounces. Edit: I believe that the refraction BSDF is casting a shadow on itself.
TL;DR (for those of you with really small screens): A glass BSDF is a refraction BSDF plus reflection.