Hi...I have a some problem with refract() function
I've used this code
float IOR = 1.6;
normal Nn = normalize(N);
vector In = normalize(I);
float eta = (In.Nn < 0 ? IOR/1 : IOR);
vector Refr = refract(In, Nn, eta);
color Sc = trace (P,Refr,"samples",8);
and got this image below:
looks like something wrong with refraction
but if I not normalize N..I get correct result (I guess so =) )but at
compiling time getting error "normal N should be normalized"
so can you help me... where I was mistaken? what's wrong?
would be very appreciated for any help