I fixed my bug ... but it still seems very strange.
For OpenGL I used reduced precision (24 bits, 8 per coordinates) for
normal. This was the problem for povray !
I tested in my code the original normal and the reduced precision normal
only differs per 3% and the normal are almost orthogonal to the surface
(visually from the ligthing).
So I can not explain how such a small difference can make povray
exchange the front and back side (a pity the manual is not filled with
mathematical formulas as the OpenGL spef does !!! may be there is an
advanced user manual ?).
Anyway, I moved to 16bits per coordinate and it now works.
Thanks.
Post a reply to this message
|