#144754 - Noda - Tue Nov 06, 2007 6:02 pm
Hello!
To use the sin/cos table with degree angles I use a function like this:
but how to deal with radian angles?
My second question is concerning cubes & normal:
Will it make a change if for a cube model I define a normal per vertices or per face? will it make the lightning smoother along a face if I use a normal per vertices? (if so, what would be the formula to calculate the normal for a vertice?)
Thanks ;)
To use the sin/cos table with degree angles I use a function like this:
Code: |
// sine function
int32 sinf32(f32 angle) { return (SIN[(int)((angle * LUT_SIZE) / 360) & LUT_MASK]); } |
but how to deal with radian angles?
My second question is concerning cubes & normal:
Will it make a change if for a cube model I define a normal per vertices or per face? will it make the lightning smoother along a face if I use a normal per vertices? (if so, what would be the formula to calculate the normal for a vertice?)
Thanks ;)