|
![](/i/fill.gif) |
Massimo Valentini wrote:
> "Le Forgeron" ha scritto
> :
> : > An other one could be to avoid the normalization of the
> : > direction of the ray, it appears to me useless.
> :
> : It is NOT useless. When CSG operation/object (union & merge, at least)
> : will ask its component, it will orders the intersections by depth order
> : before answering to the upper level. Thus, putting back the depth from
> : object space to global space is mandatory (otherwise, strange things
> : will happens).
> :
> : Same goes when more than a single cone/cylinder get intersected by the
> : ray, the engine need to order them correctly, in the global space!
> :
>
> I try to show what I mean. You are first scaling the direction
>
Ok... I understand better what you wanted.
I first thought that you wanted only to remove the division of the depth.
So, far, your suggestion looks ok, and it might deserves a study of the
code, as well as experiments (just to check there is no adverse effect
due to a precision problem...probably not, but I'm afraid of sturm
solver effects). The study should also find out if there is any speed-up
(or slow down) with the new code. (and by how much).
Post a reply to this message
|
![](/i/fill.gif) |