Groups | Search | Server Info | Login | Register
Groups > comp.graphics.rendering.renderman > #7
| From | wildyuriy <wildyuriy@gmail.com> |
|---|---|
| Newsgroups | comp.graphics.rendering.renderman |
| Subject | refrection problem |
| Date | 2011-07-03 02:38 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <5c9e16be-d90c-4f56-aceb-5eaf26e854a1@t9g2000vbv.googlegroups.com> (permalink) |
Hi...I have a some problem with refract() function
I've used this code
[code]surface test_refraction()
{
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);
Ci= Sc;
Oi=Os;
}[/code]
and got this image below:
[img]http://img9.imageshack.us/img9/7602/normalize.png[/img]
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"
[img]http://img263.imageshack.us/img263/605/wonormalize.png[/img]
so can you help me... where I was mistaken? what's wrong?
would be very appreciated for any help
Back to comp.graphics.rendering.renderman | Previous | Next | Find similar
refrection problem wildyuriy <wildyuriy@gmail.com> - 2011-07-03 02:38 -0700
csiph-web