Dashboard_avatar
Nov 30, 2007
Post id: 266042 Report Item

hi

I have a question.
I can't get world normal.

"""
vector i = normalize(I);
normal n = normalize(N),
nf = faceforward(n, i);
"""
From this code it doesn't work.
Because it refers to camera not world.

please help me.
thank you.

Dashboard_avatar
Nov 30, 2007
Post id: 266043 Report Item

Look at vtransform in the documentation of your renderer.
You probably need to do something like:

vector Nw = vtransform( "world", N );